0

I setup a Drupal Website with Openlayers3.

  • Openlayers Module: 7.x-3.1 - 2016-Jan-03
  • Openlayers Library: 3.11.2
  • Drupal Version: 7.56

The settings are the default. I'm just trying to show a Geofield through a widget Openlayers with a setup like this:

  • Openlayers map: Openlayers Geofield: Formatter Map
  • Openlayers layer: openlayers_geofield_layer_formatter
  • Data options: Use full geometry

The map is there, controls and marker are ok, but either on the preview and on the field display I see no tiles, they are being loaded from the wrong place. This is the screenshot of the error I get:

Error Screenshot

Errors are like this:

GET https://otile1-s.mqcdn.com/tiles/1.0.0/osm/3/3/3.jpg:1 GET https://otile1-s.mqcdn.com/tiles/1.0.0/osm/3/3/3.jpg net::ERR_NAME_NOT_RESOLVED
Image (async)
Mz @ ol.js?ov6n8a:756
l.load @ ol.js?ov6n8a:688
Lk @ ol.js?ov6n8a:190
l.Qk @ ol.js?ov6n8a:439
c.port1.onmessage @ ol.js?ov6n8a:139
[...]

JQuery Update is Installed and I tried many jquery versions combination (default, 1.7, 1.10...)

I can't get it work... I just want to show a geofield as a map. Any other workiaround in order to achieve that?

0

You can find the solution with the patch, HERE.

MapQuest, which is the default map of Openlayers, doesn't work. You need to switch to another map, e.g., Openstreetmap.

3
  • Thank you, but for me, I don't have any code in libraries for this patch to apply, i.e. not sites/all/libraries/openlayers3/build/ol.js which the patch applies to. As I explain here, my install of openlayers-7.x-3.1 reported js library present (without me having to do it separately): drupal.org/project/openlayers/issues/2905018#comment-13390795 Dec 13 '19 at 15:54
  • I think I've worked it out - I studied the versions of contrib modules and libraries in the Drupal FarmOS distribution and copied the key modules for mapping into my own 'vanilla' D7 setup. With some further setup, including drush dl-openlayers command (no space, that's really how it's meant to be), I am having more success. Dec 13 '19 at 17:33
  • I'll try to update with more useful information to help others in a similar situation. Dec 13 '19 at 17:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.