ckan / ckanext-mapviews

CKAN Resource View to build maps and choropleth maps
26 stars 23 forks source link

Create regular non-choropleth map #13

Closed vitorbaptista closed 10 years ago

vitorbaptista commented 10 years ago

What I want is, basically, being able to create a map preview which, unlike the geojson preview in ckanext-spatial, is also navigatable.

amercader commented 10 years ago

@vitorbaptista, just out of curiosity, how is the geojson preview not navigable?

vitorbaptista commented 10 years ago

@amercader Navigable might not be the best name.

@kindly and I built a filtering system used by ckanext-basiccharts and ckanext-choroplethmap. The problem we were trying to solve is how to add a bit of interactivity to the charts, so the user is able to explore.

Our solution was to create something similar to what OpenSpending does. We add a filters key in the URL, so the user is able to do ?filters=region:Catalonia|year:2012, and the data would update accordingly. We used the URL as an integration point, so if there're many charts on a single page (in a dashboard, for example), they all would show use the same data.

What navigable means in these map's context is that when you click on a region, it'll add filters to the page, so you're able to control what you want.

As a bad (and currently bugged) example, check http://pakistan.ckanhosted.com/dataset/sam/resource/40b0c6df-598b-49f5-9787-3cfa71edf794?view_id=7ee1cace-21a2-4257-8026-e9b12fda4a90. Try clicking on a region, and see that it changes the URL.

I have to document this system and extract it somewhere other views can reuse.

vitorbaptista commented 10 years ago

I guess we should talk in a few weeks. This extension is getting closer to what ckanext-spatial's geojsonpreview does. We'll end up having to decide how to (and if) merge both.