3

I'm using Qgis 2.12.2-Lyon on Ubuntu 14.04 LTS.

With the OpenLayers plugin I added some OpenLayers to my Canvas. I usually use the WGS 84 (EPSG:4326) projection for my project, but I have to switch on the OpenStreetMap or BingAerial layers sometimes.

When I forget to change the projection to WGS 84 / Pseudo Mercator (3857) a priori then a python error occurs:

(Traceback (most recent call last):
          File "/home/.../.qgis2/python/plugins/openlayers_plugin/openlayers_layer.py", line 120, in request
            self.setup_map()
          File "/home/.../.qgis2/python/plugins/openlayers_plugin/openlayers_layer.py", line 185, in setup_map
            olSize = QSize(int(olWidth), int(olHeight))
        OverflowError: cannot convert float infinity to integer).

And the project is loading in perpetuity (sometimes crashes running on Windows).

Is there a way to avoid this behaviour?

Is it possible to create a short-key to change from any EPSG to WGS 84 / Pseudo Mercator (3857)?

Is it possible to have a drop down menu at the bottom right of the Canvas where you can change the EPSG a bit faster?

3

A similar question was asked before: Is it possible to have another CRS in the status bar than used for the map? and the asker finally wrote this piece of code:

http://code.activestate.com/recipes/578692/

But I got stuck with it sometimes on startup.

You might be better of with the new QuickMapServices plugin, which can deal with different projections far better than the openlayers plugin.

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.