Hi,

Please forgive me if this is not a bug with this module but it's the only thing I can see going wrong. My issue comes from the fact that I maintain http://drupal.org/project/openlayers_solr and today I upgraded my openlayers module from a very old release to use the latest stable version, which now requires this module and seems to have changed a fair bit. I have done my best to bring my custom layer in line with the new API (I semi-copied openlayers_views implementation) but still can't get this working.

The only errors I can currently see are related to this module, and it seems to be using strange paths to try to load some js files, these errors appear in the console:

TypeError: Cannot read property 'w' of null                                                                                                                                      openlayers.js:443
Uncaught TypeError: Cannot read property 'openlayers' of undefined                                                                                                               search.js:154
(anonymous function) search.js:154
b.extend.ready jquery.js:30
u
Failed to load resource: the server responded with a status of 404 (Not Found) https://mysite.com/defs/ESPG:4326.js
[blocked] The page at https://mysite.com/projects ran insecure content from http://spatialreference.org/ref//ESPG:4326/proj4js/ .                  proj4js-compressed.js:40

Any help would be much appreciated!

Cheers,
A

CommentFileSizeAuthor
#3 openlayers_solr.zip11 KBacbramley
#2 openlayers_solr.zip10.99 KBacbramley
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Pol’s picture

Hello,

Could you explain how to reproduce the bug ? I will try to do it from home tonight.

Thanks.

acbramley’s picture

FileSize
10.99 KB

Hey,

Thanks for replying, the custom module I'm using is attached as a zip here. It's a contrib module I maintain but I don't want to commit half working code just yet.

If you enable it and create a map using a Google maps base layer with the Apachesolr Integration overlay layer and add the map to a page you should see them.

I managed to stop the resource loading errors (so this may now belong in the Openlayers queue) but these following two still exist and I'm really lost as to what I've done wrong.

acbramley’s picture

Project: Proj4JS » Openlayers
Version: 7.x-1.2 » 7.x-2.0-beta5
FileSize
11 KB

Moving to openlayers queue to hopefully get some help to fix this. The errors I'm still receiving are:

TypeError: Cannot read property 'w' of null                                                                                                                                      openlayers.js:443
Uncaught TypeError: Cannot read property 'openlayers' of undefined                                                                                                               search.js:154

The zip I uploaded above is the incorrect version, this one is my latest attempt.

acbramley’s picture

Title: Trying to load resources from strange urls causing custom map layer to break » Javascript errors when attempting to use custom layer
acbramley’s picture

@Pol, any chance you've managed to try this?

acbramley’s picture

Issue summary: View changes

urls

acbramley’s picture

Status: Active » Closed (fixed)

I've managed to get it working now, released as 7.x-1.1 version of openlayers_solr

Pol’s picture

Excellent !

I think we should renamme module who depends on OpenLayers 7.x-2.x: 2.x

Just like I did for OpenLayers External Block Switcher, OpenLayers Blocks and OpenLayers Filters.

What do you think ?

Pol’s picture

Issue summary: View changes

broken link