Reviewed & tested by the community
Project:
Openlayers
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
15 Mar 2016 at 15:50 UTC
Updated:
29 Apr 2016 at 23:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
m.stentaPatch attached.
The following code illustrates an example usage. Simply put this into a javascript file and include in the same page as your map with drupal_add_js().
Comment #4
jantoine commentedThis is a much better approach than what I was trying to do which was to copy how the GeoJSON source component is extended. Instead of using drupal_add_js() to include your javascript on a specific page, hook_openlayers_object_postprocess_alter() might be more robust as it is path independent and will load your javascript no matter where your maps/popups are loaded.
Example code:
Comment #5
m.stentaThanks for the JS loading tip @jantoine! And for trying the patch! :-)
If it's working for you, feel free to mark this issue "Reviewed & tested by the community".
Comment #6
jantoine commentedThis is working great for us!