I'm using angular-google-maps in my project.
I'm trying to add multiple markers, using objects of the following definition:
vehicles = [
{
stuff: "stuff",
last_known_location: {
latitude: number,
longitude: number
}
},
{
stuff: "stuff",
last_known_location: {
latitude: number,
longitude: number
}
},//...etc
]
My directive looks like:
<markers models='vehicles'
coords='vehicles.last_known_location' >
</markers>
Vehicles is an array of objects as described above.
This doesn't work. If I change my model to just have properties of latitude and longitude and completely lose the last_known_location
property and change my directive coords='self'
then it works fine. What do I need to do to get this working with my json structure?