-
-
Save jpfuentes2/4496664 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
drawLandmarks: function() { | |
var parent = this; | |
var createListenter = function(shapeMarker, landmark) { | |
google.maps.event.addListener(shapeMarker, 'click', function() { | |
parent.setLocation('activity', landmark.id, landmark.name, shapeMarker); | |
}); | |
} | |
for (var i = 0, landmark; landmark = this.landmarkData[i]; i++) { | |
if(landmark.type == "circle") { | |
var shape = this.drawCircle(landmark); | |
} else { | |
var shape = this.drawPolygon(landmark); | |
var shapeMarker = new google.maps.Marker({ | |
position: this.getPolygonCenter(landmark), | |
title: landmark.name, | |
map: this.map | |
}); | |
createListenter(shapeMarker, landmark); | |
} | |
this.landmarks.push(shape); | |
} | |
this.setBounds(); | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment