hi there,

while i find this module very exciting, the first thing that i'm missing is documentation on the "big view" . i understand that this module has a specific purpose - providing data from views as geojson. but i think, we could come up with one or different examples on how to use it in order to implement a nice mapping solution.

so, with your input, i believe i could do some work the next weeks on testing the module, implementing use cases and documenting such.

how about taking some questions:

  • which existing sites that you know use views_geojson, yet?
  • how to best store the data being used, geofield?
  • which techniques do you use to visualize the geojson on a map?

disclaimer:
i'm currently investigating different mapping techniques with drupal, including openlayers, leaflet, mapping ...
last year, i worked a lot with openlayers to create austrofeedr: http://www.austrofeedr.at
recently, i did some patches for the leaflet module and plan to look more deeply into mapping
http://www.drupal-austria.at/report/mapping-quick-intro-openlayers-leafl...
altogether this might end up as my master thesis and i have compiled some notes so far
http://www.xmind.net/share/_embed/das_jo/interactive-map-visualization-t...

Comments

dasjo’s picture

jeffschuler’s picture

Thanks for your interest, dasjo!

My original use for this was on site where I use OL for maps on the front-end, but needed to get all of the locative data out into something to make maps for print, (which ended up being Tilemill.) That's still my primary use of the module, but my hope is that it can become a/the primary data delivery mechanism for the OpenLayers module. I'd expect it could serve Leaflet, Modest Maps, Polymaps similarly, and the Mapping module yet to-be.

Yes, Geofield is my preferred option for storage, but Location and basic Lat/Lon work just as well. There's WKT support, too, though I've only tested it through Geofield.

I'd be glad for your help here in whatever direction you see fit. Yes, #1370448: Provide GeoJSON Layers from Views (integrating with views_geojson) is definitely high priority, and working out the kinks of #1333324: Bounding Box filtering (for OL in particular.) I'd be very interested whether this module works well with Leaflet, too, as I haven't yet tried that route.

Glad to hear your further ideas. Thanks!

dasjo’s picture

yep, the openlayers integration seems to come in soon. that might be a big opportunity for views_geojson to find a broader audience.
also on my agenda would be trying to have integration with the leaflet module

let's keep in touch, especially looking forward to a potential BoF in denver...

jeffschuler’s picture

Hey @dasjo, now that #1370448: Provide GeoJSON Layers from Views (integrating with views_geojson) and #1333324: Bounding Box filtering are in, what do you think about this? Your help in documenting use cases would be greatly appreciated. :)

Where would these go? On the project page, in the README, in d.o. docs?

BTW, I opened up a new issue for #1516906: Leaflet integration.

jeffschuler’s picture

Maybe we should work on getting Views GeoJSON into OpenLayers Locator?

jeffschuler’s picture

One thing that could be better documented, (and fairly easily,) is why use this module.

Part of the purpose (the why) is to get rid of the clunky OpenLayers Data Overlay paradigm. We could also document how to re-make OpenLayers Data Overlay views as Views GeoJSON views... or better yet, create a utility, (a sub-module, probably,) to convert them.

dasjo’s picture

also, i like Views GeoJSON for making the initial site request smaller while loading the points using Ajax.

it's also worth noting, that by default openlayers data overlays output all points in the html header which might slow the page load dramatically. there is a workaround, though: #1315866: How to move javascript to the end of the HTML output

dasjo’s picture

Issue tags: +Documentation, +mapping

tagging for barcelona mapping sprint

florisg’s picture

Status: Active » Closed (fixed)

Use case of Druplicon blog activity
Documentation page: http://drupal.org/node/1637324
This issue is closed.

dasjo’s picture

Status: Closed (fixed) » Needs review

setting to needs review first :)

jeffschuler’s picture

Category: support » task
Status: Needs review » Active

Thanks @idevit and @batigolix! And thanks again @dasjo for organizing the sprint.

This is a great start. I've added a link to the use case from the project page, (under Usage,) and made a few revisions.

The ending could use some more attention. I'm going to leave this issue open in case we can get some more eyes on this, and until we can get it into a fairly complete and polished form.

Thanks a lot for you work!

ressa’s picture

I am using the GeoJSON module to limit the number of points on the map using Bounding Box, and it just works, which I think is just Fantastic. Thank you very much!

The documentation is getting better, I think adding step number 6 to the README.txt would help along a little as well. Point 1 to 5 is already included:

USAGE
-----

1. Create a View with a Page display on content with geospatial data.
2. Add fields to output a Geofield, longitude & latitude or WKT.
3. Optionally add fields for name and description.
4. Set Format for the display to "GeoJSON Feed".
5. In the "Style options" for this format:
  * Choose Map Data Source (Other: Lat/Lon Point, Geofield, etc.)
  * Assign the fields that represent Latitude and Longitude.
  * Optionally choose fields representing name and description for each point.
  * Optionally set a JSONP prefix, (see http://en.wikipedia.org/wiki/JSONP).
  * Set the Content-type header to be sent. The default is "application/json",
    the standard MIME type for JSON, per http://www.ietf.org/rfc/rfc4627.txt.
  * Optionally enable "Views API mode". By default the plugins stop Drupal from
    doing any additional processing when a view is rendered, allowing the
    content to be output without normal page markup. If you are calling a view
    programatically, enable "Views API mode" to avoid early termination of
    Drupal execution.
6. If used with for example the Openlayers module, activate your new layer under 'Structure' -> 'Openlayers' -> 'Layers & Styles'
jeffschuler’s picture

Status: Active » Fixed

@ressa: good idea.

I committed this addition:

6. If using with the OpenLayers module, your new GeoJSON layer will be available as an Overlay layer on the "Layers & Styles" tab when editing your map.

Thanks!

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

up