6

I was using Google Maps with OpenLayers plugin in QGIS with my vector layer with projection EPSG:4326 with google map projection EPSG:3857 and "on the fly" transformation enabled.

It was matching all the vector layer with Google Maps but now it's not working.

How can I reproject Google Maps so that it matches with my vector layer as before?

AndreJ
  • 76,698
  • 5
  • 86
  • 162
Rajesh Kumar
  • 313
  • 2
  • 11

4 Answers4

5

Trying to find a solution, I've changed OpenLayers.js file, provided by plugin authors (which had 'Release 2.11' version in his body and was placed at ~/.qgis2/python/plugins/openlayers_plugin/weblayers/html folder in my system) to last 2.13.1 version from official OpenLayers site (pay attention, 2.+ version!).

Just download the archive, extract to temporary folder and copy OpenLayers.js (750+ Kb) to where the same file exists in QGIS plugin folder (I think it will be C:\Users\<UserName>\.qgis2\python\plugins\openlayers_plugin\weblayers\html\ in Windows system).

In my case problem was solved.

unibasil
  • 243
  • 2
  • 8
2

Maybe this is a different workaround than you are thinking, but when I have had issues with the Google Maps plugin I reprojected my data into EPSG:3857 and then did all my work there, then I reprojected it back to the original projection once I finished.

I've also realised when working with the plugin that sometimes the projection renders a little wonky and I just have to move the map around or scroll in or out and then my data matches up again.

Herb Fargus
  • 105
  • 1
  • 7
2

See also https://gis.stackexchange.com/a/42141/8210

The problems with the Openlayers plugin and the print composer last for years now, without a solution. As a consequence, try to avoid the Openlayers plugin when you need a print output. A new plugin, QuickMapServices, has been developed in the meantime. I suggest to try that.

Using the QuickMapServices plugin has worked for me, and just as easy to use.

Gregory
  • 402
  • 4
  • 10
0

I don't think you can reproject Google Maps data. I know I never could.

Just reproject your own vector layer to the coordinate system Google Maps uses.

sig_renato
  • 450
  • 2
  • 13