Skip to content

Instantly share code, notes, and snippets.

@here-devblog-gists
Created November 14, 2016 16:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save here-devblog-gists/87dbdff49e09666a4a3e45923d847ae7 to your computer and use it in GitHub Desktop.
Save here-devblog-gists/87dbdff49e09666a4a3e45923d847ae7 to your computer and use it in GitHub Desktop.
HEREPlaces.prototype.updatePlaces = function(places) {
var markerOptions = {
icon: new H.map.Icon(Utils.icons.iceCream.url, Utils.icons.iceCream.options)
};
this.clearSearch();
this.searchResults = places.map(function(place) {
var marker = new H.map.Marker(place.coordinates, markerOptions);
this.map.addObject(marker);
marker.addEventListener('tap', this.onClickPlace);
return marker;
}.bind(this));
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment