Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // percorre o array obj para adicionar arvores
- for(var i= 0; i<=obj.length; i++){
- var mk = {lat: parseFloat(obj[i]['cordx']), lng: parseFloat(obj[i]['cordy'])};
- // adicionar marker ao mapa
- var marker = new google.maps.Marker({
- position: mk,
- map: map,
- title: 'Uluru (Ayers Rock)'
- });
- // informacoes do marker
- google.maps.event.addListener(marker, 'click', (function(marker, i) {
- return function() {
- infowindow.setContent(obj[i]['idcoordenada_arvore'] + " " + obj[i]['idpedido'] );
- infowindow.open(map, marker);
- }
- })(marker, i));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement