Closed (fixed)
Project:
Openlayers
Version:
7.x-2.x-dev
Component:
OL Views
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
14 Dec 2011 at 11:37 UTC
Updated:
4 Apr 2012 at 21:50 UTC
Jump to comment: Most recent file
Comments
Comment #1
polPatch for 7.x-2.x.
Comment #2
polComment #3
nod_I can't speak about the functionality but try to keep code indentation and style consistent please.
I guess you could put the if as an elseif after the check for display_plugin. Like that i'm not sure it's going to work all the time. What about a view with several geojson display ?
maybe we should look at making a hook somewhere to avoid having to change the function at every new display_plugin
Comment #4
nod_Actually it should already be pluggable, have you tried to implement hook_openlayers_layers() in views_geojson module to declare layers from there ? I think it should be the way to go.
Comment #5
polThanks @Nod_, I wasn't aware of that hook.
This is closed and a new patch has been rolled for views_geojson.
Comment #6
nod_Cool, sorry haven't thought about it yesterday night :)
Comment #7
zzolo commentedHey @Pol and @nod_.
I think this would be better in this module, as I think we should move to having this method of providing Drupal data (views_geojson) as the preferred way. It seems more appropriate for the integration to be here, as we should be managing display. Overall, there's not a great argument either way, but I would rather have it here so that we can make it robust.
So, in that regard, @Pol, you patch is pretty good. There are some minor formatting things, like spaces, and your array strucutres, but otherwise its the right direction. I'll need to test it out a bit before committing though.
Comment #8
polHere's a new patch with a correct indentation, I hope :)
Comment #9
polComment #10
polLast patch had an error, it has been pasted 2 lines after the braces, so => error.
Here's a reroll of the patch corrected.
Comment #11
polDamn indentation !
Comment #12
dasjocoming from #915708: Context Background and Overview of the mapping module
http://drupal.org/node/915708#comment-5485792
i will look into that, maybe i can do the same for views integration of the leaflet module #1338326: Added support for views and some configuration options
Comment #13
dasjoyay, just tested this and it works!
just a side note:
while testing i used (the old fashioned openlayers way) the same view for both generating geojson (display 1) and displaying the map (display 2). as i forgot to check to override the format setting for one of the displays, it changed the geojson format to map and therefor produced the following error
Comment #14
polWeird error, can you reproduce it ?
Do you think it's related to my patch ?
Comment #15
jeffschulerWorking great for me so far; thanks Pol!
Layer names weren't showing up properly for me, and this helped:
Comment #16
polThanks for testing it ;-)
Patch updated with recommandations from @jeffschuler.
Comment #17
jeffschulerGreat, thanks!
Back to RTBC.
Comment #18
jeffschulerI'm not going to mess with RTBC status here at the moment, but I'm working on adding support for BBOX filtering that's now in Views GeoJSON 7.x-1.x-dev.
The bbox string is being queried and dealt with properly in the first request for the map (and upon enabling other layers,) but dragging/zooming around doesn't re-request data as I'd expect it to.
This diff is against OL + patch in #16:
Thoughts appreciated!
Comment #19
zzolo commentedThanks for the patch and reviews! Committed:
http://drupalcode.org/project/openlayers.git/commit/b25cd7f
Let's move the BBOX strategy to a new issue.
Comment #20
zzolo commentedBBOX stuff over here: #1493344: Support BBOX strategy in the GeoJSON layer type
Comment #21.0
(not verified) commentedUpdates.