I have this type of data in an object in my project.
{
"name": "Travel",
"map": [
{
"name": "Montreal",
"lat": "45.498649",
"lng": "-73.492729"
},
{
"name": "Brossard",
"lat": "45.466667",
"lng": "-73.450000"
}
]
}
How can I create this type of structure code to show my Google Map ?
var locations = [
{
name: "Montreal",
latlng: new google.maps.LatLng(45.498649, -73.492729)
},
{
name: "Brossard",
latlng: new google.maps.LatLng(45.466667, -73.450000)
}
];
Thanks a lot.