google maps plusieurs marks
je veus afficher plusieurs marks on google map
par exemple j'ai ce code de javascripte statique bien fonctionnelle ;)
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
var markers = [
{
"title": 'Aksa Beach',
"lat": '19.1759668',
"lng": '72.79504659999998',
"description": ' www.aksa.com'
},
{
"title": 'Sanjay Gandhi National Park',
"lat": '19.2147067',
"lng": '72.91062020000004',
"description": 'Sanjay Gandhi National Park is a large protected area in the northern part of Mumbai city.'
}]
; |
pour stoker tous les marks est ses information pour infowindow
mais pour moi je veux le redre dynamique
par exemple
Code:
1 2 3 4 5 6 7 8 9 10
|
@foreach (var item in Model) {
markers += {
"title": 'item.name',
"lat": 'item.lat ',
"lng": 'item.long',
"description": ' item.'descr'
},
} |
après en doit fermer le tableaux
si possible