Active
Project:
Openlayers
Version:
7.x-2.x-dev
Component:
OL Views
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
18 Oct 2012 at 20:51 UTC
Updated:
31 May 2013 at 15:04 UTC
I have a OpenLayers map that is Views powered. It is displaying a custom entity type that, at current, has 512 records.
They are all geocoded properly.
What I would like to do next is provide a filter enabled map view (just 2 or 3 Fields) that updates on change via Views AJAX setting. I'd also like the pin pop ups to use a view mode of my choosing. I've found that, even with 50 results, the map can load fairly slow.
Are there any best practices for a very snappy map / interaction experience? What can I strip away to make it as fast as possible? Is there a way to create my own page/form and send requests with JSON?
Comments
Comment #1
jeisses commentedI had performance issues as well, this sandbox fixed them for me: http://drupal.org/sandbox/Fabianx/1540306
Using OpenLayer Quick Query I can load 2000+ items using 12 exposed filters very fast using Views AJAX.
Comment #2
mellowtothemax commented@ jeisses
hi,
could you possibly explain how you setup the module mentioned, as I am having problems configuring it to work.
I am urgently need it for a site I have with over 10000 nodes geocoded and it takes over 1m 30 to load the map.
regards,
Comment #3
jeisses commented@mellowtothemax
sure, this is how I set it up:
1) Install module
2) Apply the patch included in the module to the OL module (it's small patch, I applied it by hand).
3) In you module, implement hook_openlayers_quick_query_info(), from the projects page:
field_geolocation must be geo field of your node, the $info['attributes'] are attributes to the vector in OL (e.g. for info in popup).
I decided for speed to load popups with AJAX, so I only used 'nid' as attribute.
Comment #4
merilainen commentedI tried the same as above, but cannot get anything out.
"I decided for speed to load popups with AJAX", any instructions how to do this? Custom code?
So would that custom hook basically override any fields you have added in the view itself? What about other stuff like other displays which I'm using for different layers on the same map etc? How do you provide a title for the popup? (I assume it has something to do with that "node_link_fast" value in the array)
Comment #5
namwebs commentedHi,
@jeisses: Could you elaborate on point 3 - where does this code have to go? What is the 'projects page' that you mention?
Thanks