0
votes

I'm doing a mapbox project, where I have a list of projects on the right side of the screen. Each time I click on the list of a project name, the map will zoom to the location of the project.

I imported the markers to mapbox and used mapID to show them on the map.

Now I want to highlight the marker for each project that I click on. The mapbox highlight examples are based on geojson or csv, but I imported the markers from mapbox editor. Can anyone show me how to do the highlight?

1

1 Answers

0
votes

The code will be generally the same: see the L.mapbox.featureLayer documentation: instead of using setGeoJSON or loadURL like the examples do, initialize it like L.mapbox.featureLayer('mapid'), replacing 'mapid' with your mapid.