Created
November 30, 2015 21:38
-
-
Save maletor/a6c2686980a92a8fcfd7 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
hoverMarker: (e) => | |
@map.featuresAt(e.point, { radius: 16, layer: 'markers' }, (err, features) => | |
return unless features[0] | |
model = @collection.get(features[0].properties.id) | |
model.marker = 'secondary-marker' | |
return @addToMap() | |
) | |
@collection.each (model) -> | |
model.marker = 'default-marker' | |
@addToMap() | |
addToMap: => | |
features = @collection.toGeoJSON() | |
@sourceObj.setData(features) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment