Hello -

I am trying to follow this advice at OL Settings:

By default the your site will point to a hosted version of the OpenLayers library, at http://openlayers.org/api/2.9/OpenLayers.js.Alternately, you can download OpenLayers, add it to your Drupal installation, and use a relative path like sites/all/modules/openlayers/OpenLayers-2.7/OpenLayers.js

I downloaded 2.10 Stable tar.gz version from the front page at http://openlayers.org/

Extracted and installed locally at /public_html/sites/all/modules/openlayers/OpenLayers_library/OpenLayers-2.10

Note that is slightly different than the advised path.

Got this error message: Error during map rendering: TypeError: this.projection.getUnits is not a function

Which is the same error from this thread: http://drupal.org/node/822350

That thread relates to a problem with the hosted version so is not the same exact problem.

My question is, is there a certain version which should be used locally? One of these?

Or is something else wrong?

Thank you.

Comments

tmcw’s picture

This module is not yet compatible with OpenLayers 2.10. You'll want to download 2.9: on openlayers.org.

itserich’s picture

Status: Active » Closed (works as designed)

Thanks, I think it installed correctly.

rhymeswithcamera’s picture

This was a very timely post/response. Last night for no obvious reason, my dev site started to return the WSOD for any page I visited. I noticed in the browser that my site was trying to access openlayers.org. So I tried to access openlayers.org in another browser (and another machine), and sure enough, the site was down. Within 5 minutes, however, that site was back up and my site was functioning properly again. I was sort of surprised that connecting to the hosted version would impact my entire site like that. My newbie expectation is that it would only impact those pages with maps (which, in my case, was 2 pages on the entire site). Oh well.

Lesson learned: Don't depend on the hosted version for any serious development or production environment - 'cuz it brings your site down to its knees. I now have version 2.9 downloaded.

itserich’s picture

Want to add, I first put the library into the modules directory. Seemed to work fine except some map icons (navigation) did not display correctly.

So I have moved it to the location suggested at Site Building -> OpenLayers -> Settings, cleared cache, and all seems good.

It does seem to reduce page loading time quite a bit.

Thanks for the help.