I have an Openlayers 3 application which has a default map projection of EPSG:27700 with both base layers and WFS layers using the same system as well as various mapping tools like measuring options.

I would like to add a base map layer which uses the Web Mercator (EPSG:3857) projection - after adding the layer as a new tile service, it does appear but there is a shift in where it sits on the map (due to the difference in coordinate system).

My question is, am I able to reproject this Web Mercator layer on the fly, without having to change my view projection?

I have provided a fiddle to a working example below - if you zoom right down to building level you will notice an approx 15 metre shift between base maps (https://jsfiddle.net/1bayd0ps/).

  • Tile should be reprojected automatically to the projection of your view . Can you provide a fiddle? – pavlos Sep 6 '17 at 14:36
  • @pavlos Here is a fiddle jsfiddle.net/1bayd0ps – Chris Sep 7 '17 at 8:22
  • Hi this is correct. You use basemaps from different sources. Do not expect to fit 100%. The same think would happen if you were using Google maps , or any other different source. Your reprojection is fine. You cannt do much about the shifting. – pavlos Sep 7 '17 at 8:30
  • @pavlos Ok, I just expected a similar result as I get in QGIS - the same approach fits both base maps exactly on top of each other. – Chris Sep 7 '17 at 8:37
  • Do you use the same projection for your map in QGIS? – pavlos Sep 7 '17 at 8:38

Your Answer

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

Browse other questions tagged or ask your own question.