One thought on “(English) Temporary Fix for OpenLayers Plugin

  1. Thanks for this it’s very helpful, I was beginning to miss OpenLayers in QGIS. Can confirm that the plug-in works with QGIS Master under Ubuntu.

  2. the plugin work fine but i have some idea you can help me to do.
    Its posible add the Esri Imagery World as a new layer. I use gdal but have some problem with the proxy.???
    I tray to understand the plugin to add a new layer only can use the osm.html file and modific the lines
    var osm = new OpenLayers.Layer.OSM(
    eventListeners: {
    “loadstart”: layerLoadStart,
    “loadend”: layerLoadEnd
    var osm = new OpenLayers.Layer.OSM(
    eventListeners: {
    “loadstart”: layerLoadStart,
    “loadend”: layerLoadEnd
    And its suceful work excelent but i can not undestand how add a new option layer to add the correct name and dont destroy a existent option; its possible do it

    1. Not sure if you are allowed to use the Esri services, but I was able to make it work by copying osm.html to esri.html and add your url to it.
      And in registre that file around line 128 with something like:
      self.olLayerTypeRegistry.add( OlLayerType(self, ‘Esri’, ‘osm_icon.png’, ‘esri.html’, True) )
      Good to see that the aerials of Esri are newer then Google 🙂

  3. Thanks for this temporary fix. Unfortunately, when I try to open a bing, google or yahoo layer, QGIS bails out. On the other hand, the OSM layer works fine. Starting qgis from the console, and running the openlayers plugin opening a google layer gives me this:
    Debug: file:////home/paulo/.qgis2/python/plugins/openlayers_plugin/html/OpenLayers.js[500]: TypeError: ‘null’ is not an object (evaluating ‘viewSize.w’)
    Segmentation fault (core dumped)
    I am running QGIS master on Ubuntu 13.04

    1. As said, it is a temporary quick fix. The plugin authors theirselves will do better work.

  4. why not release it officially in Users of 1.8 will not see this version (minver=2.0). Next version (after the hackfest) would supersede this one anyway.

    1. It is/was just a quick hack to see if it was difficult to update the plugin. It is working, but not fixed in the way the original authors want it to be fixed.
      I just do not want to force anything upon them.

  5. Hi Richard,
    many thanks for making this quickfix available. I can confirm that it works with a nightly QGIS build on Mac OS 10.8.x. However, I had to uncomment lines 43-44 in as no values in the QGIS preferences were not parsed properly and the plugin returned an error. After commenting out:


    things are working as expected.
    Many thanks again, Christian

  6. error al cargar el OPEN LAYER..
    Ha ocurrido un error mientras se ejecutaba el código de Python:
    Traceback (most recent call last):
    File “C:/PROGRA~1/QGISDU~1/apps/qgis/./python/plugins\openlayers_plugin\”, line 48, in addLayer
    File “C:/PROGRA~1/QGISDU~1/apps/qgis/./python/plugins\openlayers_plugin\”, line 194, in addLayer
    layer = OpenlayersLayer(self.iface, self.__coordRSGoogle, self.olLayerTypeRegistry)
    File “C:/PROGRA~1/QGISDU~1/apps/qgis/./python/plugins\openlayers_plugin\”, line 64, in __init__ = OLWebPage()
    File “C:/PROGRA~1/QGISDU~1/apps/qgis/./python/plugins\openlayers_plugin\”, line 38, in __init__
    proxy = getProxy()
    File “C:/PROGRA~1/QGISDU~1/apps/qgis/./python/plugins\openlayers_plugin\”, line 42, in getProxy
    proxy.setPort(settings.value(“/proxyPort”, 10, type=int))
    TypeError: unable to convert a QVariant of type 10 to a QMetaType of type 2
    Versión de Python:
    2.7.4 (default, Apr 6 2013, 19:54:46) [MSC v.1500 32 bit (Intel)]
    Versión de QGIS:
    2.0.1-Dufour Dufour, ebebdf3
    Ruta de Python: [‘C:/PROGRA~1/QGISDU~1/apps/qgis/./python/plugins\\processing’, ‘C:/PROGRA~1/QGISDU~1/apps/qgis/./python/plugins\\LecoS’, ‘C:/PROGRA~1/QGISDU~1/apps/qgis/./python’, ‘C:\\Users\\wverde/.qgis2/python’, ‘C:\\Users\\wverde/.qgis2/python/plugins’, ‘C:/PROGRA~1/QGISDU~1/apps/qgis/./python/plugins’, ‘C:\\PROGRA~1\\QGISDU~1\\bin\\’, ‘C:\\PROGRA~1\\QGISDU~1\\apps\\Python27\\DLLs’, ‘C:\\PROGRA~1\\QGISDU~1\\apps\\Python27\\lib’, ‘C:\\PROGRA~1\\QGISDU~1\\apps\\Python27\\lib\\plat-win’, ‘C:\\PROGRA~1\\QGISDU~1\\apps\\Python27\\lib\\lib-tk’, ‘C:\\PROGRA~1\\QGISDU~1\\bin’, ‘C:\\PROGRA~1\\QGISDU~1\\apps\\Python27’, ‘C:\\PROGRA~1\\QGISDU~1\\apps\\Python27\\lib\\site-packages’, ‘C:\\PROGRA~1\\QGISDU~1\\apps\\Python27\\lib\\site-packages\\PIL’, ‘C:\\PROGRA~1\\QGISDU~1\\apps\\Python27\\lib\\site-packages\\win32’, ‘C:\\PROGRA~1\\QGISDU~1\\apps\\Python27\\lib\\site-packages\\win32\\lib’, ‘C:\\PROGRA~1\\QGISDU~1\\apps\\Python27\\lib\\site-packages\\Pythonwin’, ‘C:\\PROGRA~1\\QGISDU~1\\apps\\Python27\\lib\\site-packages\\wx-2.8-msw-unicode’, ‘C:\\PROGRA~1\\QGISDU~1\\apps\\qgis\\python\\plugins\\DigitizingTools\\tools’, ‘C:\\PROGRA~1\\QGISDU~1\\apps\\qgis\\python\\plugins\\fTools\\tools’, ‘C:/Users/wverde/Documents/Proyectos 2013/123000_Lagunas_norte/Informe_sulos-_lagunas’]

  7. Please help me with this error I can not open layer load and I get the above mentioned error.

Leave a Reply

Your email address will not be published. Required fields are marked *