0

If I add google map as in this link (http://openlayers.org/en/v3.0.0/examples/google-map.html), when I zoom or drag the map, features also displacing from their position and coming back to its actual position. How can I add Google Map as base map without displacement of features?

I don't want to use: https://github.com/mapgears/ol3-google-maps, because of this library I am getting many errors in the application and it doesn't support all functionalities of openlayers 3.

1

Unfortunately, this is not possible (that I know of). Google does not allow direct access to their tiles. Therefore all you may do is as they do in the link you showed. You may interact with the openlayers map and reflect this onto the Google map.

0

Until 14 August 2018 it was possible to fix the problem simply by turning off Google's animated zoom. Unfortunately all versions of the google API which supported that have now been withdrawn. The best approach now seems to be to hide the Openlayers overlay until the google animation finishes so no displacement is seen. See this question: How to disable Google map zooming animation effect?

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.