Hi,
I'm trying to use openlayers 6.x2.x-dev to display a map for point coordinates. That does not work, no map is being displayed on the node. This setup was working before, until 6.x-2.x-dev from 2010-May-02 (see #787294: JavaScript popup saying: "with map.options" for this issue). I'm running update.php after every module upgrade, and I've cleared the caches via 'admin_menu' "Clear all caches" several times.
Configuration of openlayers 6.x2.x-dev:
./admin/build/openlayers
- OpenLayers Source: http://openlayers.org/api/OpenLayers.js
- OpenLayers Default Preset: Default Map
./admin/build/openlayers/layers
- (Default)
Re. this setting: #711550: Some layers can't be added and shouldn't be added
./admin/build/openlayers/presets
- Default Map (Default)
./admin/build/openlayers/presets
- Available: Default style, Invisible style, Default select style
API keys for Google maps are entered at ./admin/build/openlayers/layers/settings
; other commercial map providers I do not use.
The georeferential data is entered into a CCK field of type "OpenLayers WKT". The widget used is "Openlayers Geocoder".
- Input Map Preset: Default map
- Feature Types: Point, Pfad, Polygon
Behaviour:
If I'm editing a node with the geodata field, I'm seeing an Openstreetmap map. If I'm entering a location name in the Openlayers Geocoder field, the map is moved, magnified and centered; a dot symbolizes the location. Other CCK fields are filled with data from Openlayers Geocoder. The WKT field is filled with coordinates like: GEOMETRYCOLLECTION(POINT(23.16006 37.63332))
.
After saving the node, I'm getting verbal geodata which was extracted through Openlayers Geocoder, but no map is shown. Also there is no warning or error on the node, but watchdog reports:
- Type: openlayers
- Location: ./admin/build/openlayers/layers
- Referrer: ./admin/build/openlayers/styles
- Message: Layer not found.
- Severity: Error
and:
- Type: openlayers
- Location: ./admin/build/openlayers/layers/settings
- Referrer: ./admin/build/openlayers/layers
- Message: Layer settings not found.
- Severity: Error
What is going wrong here, and what do I have to do to fix this?
Thanks & greetings, -asb
Comments
Comment #1
tmcw CreditAttribution: tmcw commentedIs there a public page where this map should be?
Comment #2
tmcw CreditAttribution: tmcw commentedMoving to support requests unless there's some kind of bug uncovered here. Are you using any map alters?
Comment #3
asb CreditAttribution: asb commented> Is there a public page where this map should be?
What is a public page? The site is live and online, if that's the question. Examples: 26281, 33892, 29953, 35664, 34594, 31982.
Quick cross browser check: Opera 10.53, logged in: No map is displayed on any of these nodes. K-Meleon 1.5.4, anon, shows a map on 33892 and no map on the other nodes.
> Are you using any map alters?
What are map alters? I'm using the defaults, as documented above, if that's the question.
Comment #4
zzolo CreditAttribution: zzolo commentedIt looks like there are some maps on some of these. Maybe you can give a specific example?
Also, do you have a map formatter set for the CCK field?
Also, I got this error on one of the pages:
Fatal error: Allowed memory size of 209715200 bytes exhausted (tried to allocate 16387 bytes) in /var/www/taxidi/sites/all/modules/service_links/service_links.module on line 496
Do you have enough memory set?
Comment #5
asb CreditAttribution: asb commentedContinuing cross-browser checks: FF 3.6.3/Win, anon: Displays maps on all nodes except 26281. Interesting. That's a different node type but the same field... Aha, that's how these maps are supposed to look - not zoomed in and not centered?
>Also, do you have a map formatter set for the CCK field?
That would be 'OpenLayers Geocoder', if I understand it correct (see above).
> Do you have enough memory set?
I do not know how much "enough" would be and I never managed to locate a formula for this. If this error occurs, it's most probably too low (it's currently running at a PHP memory_limit of 256M). Hm, either get rid of modules or make the site even slower by raising the memory_limit. Nasty descision. Let's starty by getting rid of Boost (done). OK, now I'm seeing maps logged in in Opera, also. On NID 33892 I'm seing a map of Liberia and Nigeria instead of Tunesia; no coordinate indicator is visible, it's probably outside the map boundaries. Centering and zooming the map would be reallyy/em> nice.
Trying to center and zoom the maps for FF: Overriding "Default Map" at
./admin/build/openlayers/presets
; changing:Saving. Reloading sample node in FF. For NID 33892 now I'm getting "Error during map rendering." and no map, not even in FF.
Unchecking "Zoom to Layer", Saving. Still no map.
Unchecking "Zoom to location", Saving. Cool, the map reappears in FF!
Checking "Zoom to Layer", Saving. Map is gone, "Error during map rendering" (reproducable). Either this setting is broken, or I don't understand it.
No wait, there's another setting on the CCK field configuration page: "Zoom to Layer" can be enabled without without causing the "Error during map rendering" error. However, the values entered for "Point Zoom Level" are ignored; after saving the field settings it's always reset to "5". Again, either this setting is broken, or I don't understand it.
No wait, after activating "Zoom to Layer" on the "region" content type, I'm getting a "Error during map rendering" on the node editing screen in FF.
Unchecking "Zoom to Layer" at
./admin/content/node-type/region/fields/field_geodaten
, Saving. Editing a node of content type "region", no "Error during map rendering" (reproducable), but Openlayer Geocoder doesn't enter it's data into the WKT field. That one we've seen before: #773358: On Adress select, no GEOMETRYCOLLECTION is beeing added to WKT textfield. And once more, either this setting is broken, or I don't understand it.OK, let's summarize:
Not much learned in the past two hours :-(
Greetings, -asb
Comment #6
tmcw CreditAttribution: tmcw commentedIf you're using the CCK display for points, rather than using a view to do it, set the zoom to layer behavior in the CCK display widget, not the preset. Using the CCK display widget is not a great idea architecturally, but if you're stuck with it, then, yeah, set this in there, not in the preset.
There is; Point Zoom Level is a setting in OpenLayers Presets. It might not be available in the CCK formatter 'zoom to layer.' The CCK formatter / map widget is really not recommended because CCK for display is really not the best way to do it - views is.
Point zoom level isn't the best way to do this; the best way is to use Geo Taxonomy with bounding boxes, due to the fact that the sizes of countries varies tremendously.
Comment #7
asb CreditAttribution: asb commented> set the zoom to layer behavior in the CCK display widget
OK, resetting the Presets at
./admin/build/openlayers/presets
and sticking to the CCK display widgets if that's the way to go.> CCK for display is really not the best way to do it - views is.
> Point zoom level isn't the best way to do this;
> the best way is to use Geo Taxonomy with bounding boxes, due to the fact that the sizes of countries varies tremendously.
I don't follow. Views to display maps inside nodes? Use Geo Taxonomy to accomplish what? Of course I'd love to get shapes into the locative terms in my "location" vocabulary for countries and regions, but where would I get these shapes, and how would I get them into my terms? Geo Taxonomy doesn't even support Openlayers Geocoder (see #787296: Integration with Geo Taxonomy), and as fasr as I have seen the Google API outputs only point coordinates. And in fact I have not the faintest idea how Geo Taxonomy would help me to display a map on the node types which don't show a map at all, or how it would help me to get rid of the "Error during map rendering" issues.
I think that's it for me. If someone is able to brew a user documentation for this - go ahead. Closing and setting to "won't fix".