After upgrading to beta4 the map in my node is not shown.

Comments

pol’s picture

Status: Active » Postponed (maintainer needs more info)
xinitrc’s picture

Hi,

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.

pol’s picture

Hello xinitrc,

We need to know basic stuff to help you like:

  1. Do you have any JS errors ?
  2. Did you run the update.php script ?
  3. Have you installed proj4js and libraries ?
  4. An export of the map and layers would be very good

Thanks.

xinitrc’s picture

StatusFileSize
new2.94 KB

Hi,

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

pol’s picture

Cool, that's something really helpful, THANKS !

Could you export also the configuration of those two layers:

  • wms_default
  • geofield_formatter

Thanks!

xinitrc’s picture

StatusFileSize
new905 bytes
new1.96 KB

Sure. Should be attached.

pol’s picture

I don't see any problems at first... I will do it from home tonight and keep you updated.

pol’s picture

Status: Postponed (maintainer needs more info) » Active
Nandos_Chicken’s picture

Had 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).

pol’s picture

I 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:

  • Remove line 61 of js/openlayers.js.
  • If your maps are exported on a file (features or sth else) add a mapExtent property. If not, you probably have better luck with the first solution.

Once we'll have a working patch and solution, we'll publish a new beta.

Thanks for your patience.

eiriksm’s picture

A quick fix that works could be:

            if (map.maxExtent) {
              options.maxExtent = new OpenLayers.Bounds.fromArray(map.maxExtent);
            }
m.stenta’s picture

@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?

m.stenta’s picture

I 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.

jdeg’s picture

I also confirm the #13, after commenting the line out, the location starts in the center of the map.

Nandos_Chicken’s picture

Has anyone tested this with an Openlayer Proximity search results map yet since the issue was identified?

c.breschkow’s picture

I also confirm #13
Do you need more information?

pol’s picture

No thanks.

We are preparing the beta5 release, it will be released this afternoon.

eiriksm’s picture

Also confirming #13. Let us know if you guys need anything to help.

pol’s picture

Status: Active » Fixed
c.breschkow’s picture

After update to beta-5 the map starts in the middle of the ocean (#13)

pol’s picture

Could you export the map and the layers ?

c.breschkow’s picture

StatusFileSize
new1.9 KB
new2.6 KB

In the attachement the map and layer export from geofield formatter.

pol’s picture

Your map is centered on 0,0.
Then, this is normal if you are in the middle of the ocean.

c.breschkow’s picture

After 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.

jdeg’s picture

After 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.

m.stenta’s picture

There 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.

m.stenta’s picture

Perhaps 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.

Maksym Kozub’s picture

I 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?

pol’s picture

@Maksym: could you export your map and layers just like cpritz did it earlier ?

Thanks.

pol’s picture

m.stenta: you need to use Geofield 2.x + a patch. Read the release note of beta5 to get the instructions. Thx.

m.stenta’s picture

@Pol: Yeaa! That did the trick! Thanks so much. I should have read the release notes... :-)

Maksym Kozub’s picture

@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?

pol’s picture

I don't know Maksym, I use Geofield 2.x.

Maksym Kozub’s picture

Posted by Pol on April 4, 2013 at 10:04pm

m.stenta: you need to use Geofield 2.x + a patch. Read the release note of beta5 to get the instructions. Thx.

Posted by m.stenta on April 4, 2013 at 10:21pm

@Pol: Yeaa! That did the trick! Thanks so much. I should have read the release notes... :-)

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.

Maksym Kozub’s picture

@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.

pol’s picture

Yeah 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.

m.stenta’s picture

Appreciate 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.

pol’s picture

I felt guilty, I did it now, could you test it ?

Maksym Kozub’s picture

Appreciate the effort on this Pol!

Seconded. 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".

pol’s picture

If dependencies change, please state it directly in the new version's notes.

Yup will do next time !

Maksym Kozub’s picture

could you test it ?

Sorry Pol, will do it in the morning — feeling dead tired with other things (midnight here), going falling to bed now :).

pol’s picture

Same here, waiting for your feedback tomorrow then.

c.breschkow’s picture

StatusFileSize
new2.73 KB
new1.9 KB

Hello,

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.

pol’s picture

Your map doesn't have any default layer.

c.breschkow’s picture

Now it works :-)
You saved my day! Good night!

c.breschkow’s picture

The only thing that doesn't work is that I can't view the map in full screen mode...

pol’s picture

jdeg’s picture

StatusFileSize
new2.56 KB
new1.74 KB

I still have the marker in the center of the map.

liza’s picture

WHOAWHOAWHOA! when did the projections dependency happen?!?!? that totally snuck up on my :(

jdeg’s picture

You can take a look to these threads http://drupal.org/node/1944074 and http://drupal.org/node/1942826

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.