Frontend for a geographic database website
August 21, 2020 12:19 PM   Subscribe

I'm building a site for viewing and filtering a certain set of geolocated information as maps and lists. The backend will be .SHP files processed through Django+Geodjango. What would be the state of the art frontend for interactive maps, with filters, layers, etc?

In the past I've used Folium and Plotly for this sort of thing, but wonder if you're aware of any library / techstack that would be better and more responsive.
I usually use HTML + jQuery for the frontend. I haven't worked with VUE, Angular, React, etc., but would be willing to learn if there where a clear value to doing so.
I could use a different Python backend, like Flask, but wouldn't be as productive in JS+Node or other languages.
This is low traffic site for a limited number of users. Concurrency and scaling are not significant issues.
posted by signal to Computers & Internet (7 answers total) 2 users marked this as a favorite
I use leaflet for map data, and it seems to work fairly well. It has some built in support for geojson, which might help for your case. It's very widely used and fairly well supported. It should work fine with jquery, but I have also used it with React with no trouble.
posted by RustyBrooks at 1:07 PM on August 21, 2020

Response by poster: Yeah, I think Folium uses Leaflet, so that would be a good way to go. Is it fairly easy to turn layers on and off without reloading the page?
posted by signal at 2:35 PM on August 21, 2020

I've used leaflet as well, and it definitely can handle layer switching without reloading.
posted by Ragged Richard at 3:41 PM on August 21, 2020

Yeah leaflet has a system where you define all the layers you want and you can decide which of them to display. here's a simple example

I use leaftlet for computer game maps (PUBG mostly) and it's so great for that, there's a whole facility for making made-up maps and having that work as if they were regular geo maps
posted by RustyBrooks at 10:10 PM on August 21, 2020

Response by poster: Do you know if you can have the layers controls outside of the map area?
posted by signal at 6:54 PM on August 22, 2020

That's a good question and I'm not sure. I would say "probably" because after all I think you can turn layers off and on directly from javascript so I don't see a reason you couldn't make some UI element somewhere else on the page that calls that. I haven't tried it but the Map objects support addLayer and removeLayer functions, so you can probably try that.
posted by RustyBrooks at 7:34 AM on August 23, 2020

(I probably won't remember to check back into this thread, so if you have any questions or thoughts, feel free to PM me)
posted by RustyBrooks at 7:35 AM on August 23, 2020

« Older Can a restaurant force an employee to declare cash...   |   Help me get rid of anything this moth may have... Newer »

You are not logged in, either login or create an account to post comments