Postgis geojson leaflet php cluster Want to cluster more than 12k points from postgis using leaflet? Am able to cluster only geojson saved on folder but not geojson from postgis "

List of QuestionsCategory: GIS ProgrammingPostgis geojson leaflet php cluster Want to cluster more than 12k points from postgis using leaflet? Am able to cluster only geojson saved on folder but not geojson from postgis "
James kirumba asked 3 months ago
< 1 minute read
1 Answers
Wanjohi Kibui Staff answered 3 months ago
1 minute read

You need to load your GeoJSON from the source(View) into your application. This can be done using AJAX in leaflet. In the tutorial at https://youtu.be/vWcasu07R7Q , the GeoJSON is loaded from the DB and loaded into Leaflet. Then the MarkerCluster, for example, is used to cluster all the points into nice visualizations on the map. It’s been a while since I used PHP but I believe you already have the PHP method to fetch the data from the DB. Use that method to bring in the data into leaflet and then cluster it. If no success, let me know.

Wanjohi Kibui Staff replied 3 months ago

You can find the PHP PostGIS Script at http://lifeingis.com/adding-data-into-extjs-grid-from-postgresql-with-php-the-json-format/ . This will help much