Closed (fixed)
Project:
Openlayers
Version:
6.x-1.x-dev
Component:
OpenLayers API
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
10 Oct 2009 at 15:55 UTC
Updated:
2 Dec 2009 at 23:38 UTC
I easily added a map to the zzolo sandbox using [openlayers default], but I can't get the filter to work on my own website (and I do have the Openlayers Filters module enabled). I've tried both [openlayers default] and [openlayers test]... test was a new preset I created to see if there was just a problem with default.
Comments
Comment #1
mcengland commentedOK... I figured out the need mess with filter settings (I'm sorry, I just started using Drupal a week ago and have no experience with PHP). I have finally been able to add a preset... but now I want to add KML or other layers. I can't find documentation of how to create a basic map using PHP snippets. The documentation shows all kinds of code for adding layers, etc... but assumes you understand PHP and Openlayers. Is there some way I can see how to create a basic map?
Comment #2
mcengland commentedAs an example... the documentation in "Advanced Help" gives code that it describes as a default map. So I took that code, and stuck it between php tags. This gives me the following:
Can someone tell me why that doesn't work? I've used used other PHP snippets from the Drupal site without any problems, but this produces nothing.
Comment #3
zzolo commentedHey @mcengland. Sorry for the delayed response. How is this going?
So, what you have above is a PHP map array that can get rendered as a map with this module. The problem is that you have to let the module know about it by implementing a hook.
This is the implementation from the openlayers module.
For your case, you would make a small Drupal module that implements this hook:
Then this would show up in the preset interface and you can use it where ever you can use other maps.
Comment #4
zzolo commentedComment #5
zzolo commentedClosing. @mcengland let me/us know if we can help out some more. Hopefully I can add more docs soon.
Comment #6
zzolo commented