Closed (fixed)
Project:
Openlayers
Version:
7.x-2.0-beta4
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Apr 2013 at 10:17 UTC
Updated:
2 May 2013 at 06:40 UTC
Jump to comment: Most recent file
Comments
Comment #1
polComment #2
xinitrc commentedHi,
I'm not the original author of the bug, but have the same problem. What information do you need? I'm happy to give you whatever part of the configuration you need.
Comment #3
polHello xinitrc,
We need to know basic stuff to help you like:
Thanks.
Comment #4
xinitrc commentedHi,
To you questions:
1. Yes: TypeError: Cannot read property '0' of undefined openlayers.js:443
2. Yes
3. Yes, proj4js 7.x-1.2 and libraries 7.x-2.1 (both the most recent recommended releases)
4. You'll find it attached.
Thank you
Comment #5
polCool, that's something really helpful, THANKS !
Could you export also the configuration of those two layers:
Thanks!
Comment #6
xinitrc commentedSure. Should be attached.
Comment #7
polI don't see any problems at first... I will do it from home tonight and keep you updated.
Comment #8
polComment #9
Nandos_Chicken commentedHad to revert back to beta3 due to this issue. Most maps worked fine, however maps configured using Manage Display > Openlayers Format on a Lat/Long field no longer displayed. Also, map displaying results of Openlayers Proximity module search no longer displayed correctly (all placemarks appear at (0,0) and popups do not work).
Comment #10
polI think we have identified the problem, it's because of the missing maxExtent in the map definition.
Augustus is working on a patch to remove the maxExtent property because it can be calculated automatically from the projection.
In the meantime, if you want to get it working, two possibilities:
Once we'll have a working patch and solution, we'll publish a new beta.
Thanks for your patience.
Comment #11
eiriksmA quick fix that works could be:
Comment #12
m.stenta@Pol regarding comment #10: I have a map exported via Features which stopped working. I'd like to try adding the mapExtent property to the $openlayers_maps->data array, but I'm not sure what the value should be. Any suggestions?
Comment #13
m.stentaI can also confirm that commenting out line 61 of openlayers.js brings the map back. But I would prefer a solution that involves changes to my own modules instead.
However, now the map's starting location is not working, and it starts in the middle of the ocean. Perhaps this is due to #1942826: Projection incompatibility with openlayers.? The map in question is getting it's location from a GeoField.
Comment #14
jdeg commentedI also confirm the #13, after commenting the line out, the location starts in the center of the map.
Comment #15
Nandos_Chicken commentedHas anyone tested this with an Openlayer Proximity search results map yet since the issue was identified?
Comment #16
c.breschkow commentedI also confirm #13
Do you need more information?
Comment #17
polNo thanks.
We are preparing the beta5 release, it will be released this afternoon.
Comment #18
eiriksmAlso confirming #13. Let us know if you guys need anything to help.
Comment #19
polComment #20
c.breschkow commentedAfter update to beta-5 the map starts in the middle of the ocean (#13)
Comment #21
polCould you export the map and the layers ?
Comment #22
c.breschkow commentedIn the attachement the map and layer export from geofield formatter.
Comment #23
polYour map is centered on 0,0.
Then, this is normal if you are in the middle of the ocean.
Comment #24
c.breschkow commentedAfter deleting my browser cache no map is displayed on my node.
To #23: My map is centered in the settings. But I have an address field in my node. Before I run the update this street was the center.
Comment #25
jdeg commentedAfter updating to beta 5, I also confirm the #20, location starts in the middle of the map. When I'm editing the node the point appears in the right place, but after saving it appears in the middle of the map.
Comment #26
m.stentaThere are a few different modules at play here (speaking of the issue that is starting maps at 0,0 in the ocean) -- OpenLayers, GeoField, GeoCoder. I have a feeling that this issue is in GeoField's formatter, but I don't know enough about the architecture to trace it easily. I tried both GeoField 1.1 and 2.0-alpha2 and the same result is happening with both.
It seems that all the necessary information is available in _geofield_openlayers_formatter(), and is passed into the JavaScript settings, but I'm not sure where to look after that, being unfamiliar with the OpenLayers JS library.
Comment #27
m.stentaPerhaps it has something to do with the "Placeholder for Geofield Formatter" layer? It seems that the extra WKT information it provides is not making it through to the map being rendered, and instead the center point is being set to 0,0... even when the map itself has a different default center point.
Comment #28
Maksym Kozub commentedI had the same "No map" problem; after upgrading to beta5, I see the base layer but I do not see the overlay with our GPX data. For this reason, I have temporarily switched http://personal.kozub.in.ua/trekking from OL to Geofield Map.
By the way, after all this troubleshooting, upgrading, etc., the layer type for my "Placeholder for Geofield Formatter" has been set to "Raw". I do not remember what was there in OL beta3 times. What should it be: is that "Raw" the right type, or is it just another problem/bug?
Comment #29
pol@Maksym: could you export your map and layers just like cpritz did it earlier ?
Thanks.
Comment #30
polm.stenta: you need to use Geofield 2.x + a patch. Read the release note of beta5 to get the instructions. Thx.
Comment #31
m.stenta@Pol: Yeaa! That did the trick! Thanks so much. I should have read the release notes... :-)
Comment #32
Maksym Kozub commented@Pol: I can do the export a bit later, but please tell me first: shouldn't Geofield 1.1 with manually corrected projection codes (all of them startiing with "EPSG:" now) work with beta5?
Comment #33
polI don't know Maksym, I use Geofield 2.x.
Comment #34
Maksym Kozub commentedPosted by Pol on April 4, 2013 at 10:04pm
Posted by m.stenta on April 4, 2013 at 10:21pm
Guys, to be honest, the release notes only say "There is this patch"; the release notes do _not_ expressly say that Geofield 1.1 with corrected projection codes does not work and should not be used.
Comment #35
Maksym Kozub commented@Pol: thank you for developing OL, but I must say what I see does not seem right to me on the process side.
There was OL beta3 working with Geofield 1.1. OK.
You make a new (beta5) version of OL, which is OK;
you say "Projection codes should now include authority codes", which is OK;
you provide a patch to include those authority codes in Geofield 2.x, which is great;
now _all of a sudden_ you say "you need to use Geofield 2.x + a patch" [implying "You cannot use Geofield 1.1", for no apparent reason],
and when told "OL beta5 does not work with Geofield 1.1 changed to include the authority codes in projections [exactly the same way your patch does it for Geofield 2.x]", you say "I don't know, I didn't test it with 1.1" :).
Sorry, I don't want to sound rude (especially to the developer who works a lot on this great OL module), but there _is_ something wrong in my view.
Comment #36
polYeah sorry about that, I should have written it in the changelog.
I will try to do a patch for Geofield 1.x too in the following hours.
There's so much to do that sometimes I forgot stuff, but thanks for reminding it.
Comment #37
m.stentaAppreciate the effort on this Pol! And all the new development going into OpenLayers! Great to see things moving! And great to see issues being fixed this quickly.
Comment #38
polI felt guilty, I did it now, could you test it ?
Comment #39
Maksym Kozub commentedSeconded. Again, I did not mean to be rude etc., and I do appreciate Pol's work. Mine was more of a technical/process comment, like "If dependencies change, please state it directly in the new version's notes".
Comment #40
polYup will do next time !
Comment #41
Maksym Kozub commentedSorry Pol, will do it in the morning — feeling dead tired with other things (midnight here),
goingfalling to bed now :).Comment #42
polSame here, waiting for your feedback tomorrow then.
Comment #43
c.breschkow commentedHello,
I upgrade everything and add the patch to geofield_formatter, but the map is not shown. I attached the export of the map and layer.
Comment #44
polYour map doesn't have any default layer.
Comment #45
c.breschkow commentedNow it works :-)
You saved my day! Good night!
Comment #46
c.breschkow commentedThe only thing that doesn't work is that I can't view the map in full screen mode...
Comment #47
polFixed already in dev version, see #1962240: fullscreenToggle :: ReferenceError: map is not defined.
Comment #48
jdeg commentedI still have the marker in the center of the map.
Comment #49
liza commentedWHOAWHOAWHOA! when did the projections dependency happen?!?!? that totally snuck up on my :(
Comment #50
jdeg commentedYou can take a look to these threads http://drupal.org/node/1944074 and http://drupal.org/node/1942826