AyeCode / geodirectory

GeoDirectory is the leading Directory Plugin for WordPress. Compatible with Gutenberg and the most popular page builders such as Elementor, Oxygen, Beaver Builder and Divi. GeoDirectory is the only solution for WordPress that can scale to millions of listings and high traffic.
https://wpgeodirectory.com/
Other
41 stars 22 forks source link

Mapbox compatibility #881

Open Stiofan opened 5 years ago

Stiofan commented 5 years ago

Let's look into how hard it would be to make mapbox an option for maps, please let us know how difficult it would be below (don't start it yet)

kprajapatii commented 5 years ago

I have done some research about mapbox for GD. I found one JS library "Mapbox GL JS" which have all the features we required in GD.

Here are more details. Documentation - https://docs.mapbox.com/mapbox-gl-js/ Examples - https://docs.mapbox.com/mapbox-gl-js/examples/ GitHub - https://github.com/mapbox/mapbox-gl-js

Here are the examples; Simple map with marker - https://docs.mapbox.com/mapbox-gl-js/example/drag-a-marker/ Search address & set marker - https://docs.mapbox.com/mapbox-gl-js/example/mapbox-gl-geocoder/ Detail page with marker popup - https://docs.mapbox.com/mapbox-gl-js/example/set-popup/ Detail page map directions - https://docs.mapbox.com/mapbox-gl-js/example/mapbox-gl-directions/ Marker clusters - https://docs.mapbox.com/mapbox-gl-js/example/cluster/ & https://docs.mapbox.com/mapbox-gl-js/example/cluster-html/

We need to setup GoMap class similar that we have for Google and OSM to render map. If we successful to implement mapbox then it has some good advance features. Ex: The advance feature - https://docs.mapbox.com/mapbox-gl-js/example/filter-features-within-map-view/.