It seems when any of the Virtual Earth base layers are enabled, the map is not rendered. Even if the default layer is not one of the Virtual Earth layers.

I have a valid API key and can confirm the data is being correctly mapped when other layer types are chosen.

Comments

marc.groth’s picture

Having this issue too... Subscribing...

zzolo’s picture

Category: bug » support

Are you either getting any sort of Javascript error in your browser? Are these sites live?

marc.groth’s picture

Hi zzolo,

Thanks for such a speedy response! The error I get using the Firebug console is:

TypeError: this.projection.getUnits is not a function
(undefined="[object Object]")OpenLayers.js (line 1125)
(undefined=""Virtual Earth Hybrid"", undefined="[object Object]")OpenLayers.js (line 1116)
(undefined=""Virtual Earth Hybrid"", undefined="[object Object]")OpenLayers.js (line 1302)
(undefined=""Virtual Earth Hybrid"", undefined="[object Object]")OpenLayers.js (line 1456)
(undefined=""Virtual Earth Hybrid"", undefined="[object Object]")OpenLayers.js (line 127)
(undefined=""Virtual Earth Hybrid"", undefined="[object Object]", undefined="[object Object]")virtua...?lre5m3 (line 25)
(undefined="[object Object]", undefined="[object Object]")openla...?lre5m3 (line 177)
(undefined="0", undefined="[object HTMLDivElement]")openla...?lre5m3 (line 90)
owser.msie) {Drupal.openlayers.redrawVectors(undefined=");}} catch (e) {if (typ...rendering: " + e);}}}})", undefined="[object HTMLDivElement]")jquery.js?v=1.4.4 (line 34)
Behaviors(undefined="this);if ($.browser.msi...rendering: " + e);}}}})")jquery.js?v=1.4.4 (line 27)
(undefined="[object HTMLDocument]", undefined="[object Object]")openla...?lre5m3 (line 35)
(undefined=""openlayers"", undefined="[object Object]")drupal.js?lre5m3 (line 55)
(undefined="[object Object]", undefined="(function () {if ($.isF...)) {this.attach(context", undefined=" settings);}})")jquery.js?v=1.4.4 (line 34)
(undefined="[object HTMLDocument]", undefined="[object Object]")drupal.js?lre5m3 (line 53)
(undefined="(function (j", undefined=" s) {return new b.fn.init(j", undefined=" s);})")drupal.js?lre5m3 (line 365)
()jquery.js?v=1.4.4 (line 30)
(undefined="[object Event]")jquery.js?v=1.4.4 (line 38)
[Break On This Error] if(this.projection&&this.projection.ge...is.units=this.projection.getUnits();}
OpenLayers.js (line 1125)
openla...?lre5m3 (line 104)

Unfortunately my site is not live. Would it help if I provide you with my exported map? Let me know if you need any more information/anything else exported.

Thanks in advance,

Marc

zzolo’s picture

Hey @marc.groth. Sorry for the delay. Did you work this out? Have you tried the newest dev? If you are still having trouble, please send over your map export.

marc.groth’s picture

Hey @zzolo,

Unfortunately I'm not using this module anymore (not because of this issue) so am unable to really help out any further on it.

However if I do use it again I will be sure to post back to let you know if it's working.

Out of interest, does the Virtual Earth layer work for you? If so then either a) the latest dev has fixed it or b) it's actually an issue with another module that could be conflicting with it

Brandonian’s picture

I can confirm that enabling Virtual Earth/Bing layers on a map causes rendering to fail. There's a JS error (undefined method), which causes the whole render process to drop.

nod_’s picture

well the is a problem in ol_layer_type_virtualearth.js, need to add a options.projection = new OpenLayers.Projection('EPSG:' + options.projection); line 20 or so. But then, bing fails on his own. I got the logo to display after this fix.

hampshire’s picture

I too get nothing, just white where map/controls should be. This is on a clean install and with both yahoo and bing maps. Keys have been entered for both.

zzolo’s picture

Status: Active » Fixed

Yeah, it was the lack of projection (2.11 related). Should be good now. Thanks @nod_

Status: Fixed » Closed (fixed)

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