Skip to content

Instantly share code, notes, and snippets.

@wboykinm
Created October 4, 2012 17:30
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 wboykinm/3835135 to your computer and use it in GitHub Desktop.
Save wboykinm/3835135 to your computer and use it in GitHub Desktop.
parsed properties for a markerlayer tooltip
var interaction = mapbox.markers.interaction(markerLayer);
m.addLayer(markerLayer);
interaction.formatter(function (a) {
var b = "<p>" + a.properties.call_type + "</p>" + '<p style="font-size:12px;word-wrap: break-word;">' + "Date: " + a.properties.date2 + "<br />" + "Time: " + a.properties.call_time + "<br />" + "Responding Officer: " + a.properties.officer + "<br />" + "Incident ID: " + a.properties.incident_number + "</p>" + "</a>";
return b
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment