Reputation: 3
Is there any idea why this code doesn't show the marker? Reason i have the marker code in a separate function is due to future changes where the button will obtain new data from a database thus update.
Many Thanks in Advance!
Upvotes: 0
Views: 44
Reputation: 8819
Well, it doesn't work at all, doesn't show the map. Reason is line 23:
});
Once you get there, the line:
marker = new google.maps.Marker({position: google.maps.LatLng(52.907135, -1.093140),
map: map
});
should be:
marker = new google.maps.Marker({position: new google.maps.LatLng(52.907135, -1.093140),
map: map
});
Upvotes: 1