Hi all,
I've just installed the openlayers module and I have created a content type called map, which has an openlayers WKT field.
When using the live preview, or when trying to include a view directly into a template, drupal spits out the proper html output, but it fails to append to the document's body the javascripts necessary to load openlayers, thus preventing the WKT field from being displayed as a map (it appears instead as an empty div as large as the map).
This does not happen when creating a block display for the view and assigning it to a specific region of the template.
PS: As I am new to drupal, I am not sure that this technique for including a partial template into a more complex layout is the correct one..
so perhaps this is a problem of mine and not a bug of the openlayers module.
Best,
Andrea
| Comment | File | Size | Author |
|---|---|---|---|
| home_map_view.txt | 5.58 KB | Anonymous (not verified) |
Comments
Comment #1
tmcw commentedHey,
I'm not sure exactly what you mean by the live preview (you mean just the preview button you can hit before posting?), but no, the openlayers module, like a bunch of others, isn't going to support insertion directly into a tpl or content field, since it's bad practice. Really you'll want to insert openlayers maps via views attachments, panels, or filters, so that OpenLayers runs through the entire stack - when it's running in an executed tpl file, it can't retroactively append its javascript to the document.