I am trying to set the OpenLayers source on /admin/build/openlayers so as to improve performance, but whenever I do my maps don't display correctly. The map displays as pure white occupying the same space it usually would. I have tried a path of sites/default/libraries/openlayers/OpenLayers-2.10/OpenLayers.js and an absolute URL and both have the same outcome. Is there something I am doing wrong?

CommentFileSizeAuthor
#2 error.png349.8 KBorbmantell

Comments

zzolo’s picture

Hi @orbmantell. Is there a JS error? (You can use Firebug for this). Also, have copied the OL library to that location?

orbmantell’s picture

StatusFileSize
new349.8 KB

there is an error: ReferenceError: OpenLayers is not defined

attached is a screenshot of the error displayed as well as what the map looks like.

Thanks

zzolo’s picture

Hey @orbmantell. Do you have a link to an actual page to look at? It seems like the library is not included for whatever reason, or maybe you don't have the path correct.

orbmantell’s picture

Unfortunately I don't have a link to a live non-working page. The site this page is part of is live so I have been doing all my testing in a localhost environment. The URL of the working site (using the OpenLayers-hosted source) is http://extension.oregonstate.edu/find-us

I followed the directions on /admin/build/openlayers as to what file to download, and linked to the un-archived OpenLayers.js file using a path I have triple checked for accuracy. I do not believe this is an error originating from my computer, as a coworker had the same issue I do when he attempted to set a custom OpenLayers source location on his machine.

harvlad’s picture

use v2.9

zzolo’s picture

Status: Active » Closed (cannot reproduce)

Hey, sorry for the delay in this. Its an odd issue. Were you ever able to resolve this? If so, letting us know would be great. Closing for now, but feel free to re-open.

chicagomom’s picture

Status: Closed (cannot reproduce) » Active

I am having this problem too when using either openlayers 2.10 or 2.11 js locally at sites/all/libraries/OpenLayers-2.11/ or /-2.10/. Local library version of 2.9 works ok, and the 2.10/2.11 versions do get loaded. Presets pointing to 2.11/2.10 image and css folders are seeing these folders and use them appropriately, but the map doesn't render and neither do the graphics.

Using Firebug, it notes an error in the console with both versions, at line 531 of openlayers.js:

TypeError: this.projection.getUnits is not a function
if(this.projection&&this.projection.ge...is.units=this.projection.getUnits();}

(v2.9 doesn't throw this error.)

Edited to add: using the Virtual Earth Street map.

ken-g’s picture

Issue summary: View changes
Status: Active » Closed (outdated)