Closed sander-lameco closed 1 year ago
Hi @sander-lameco, sorry for the late reply.
Good news, you can access the underlying Google Maps API object at any time!
// Internally used Google API object
map._map
Meaning that you should be able to do something like this...
// Get the plugin's map object
const map = googleMaps.getMap(mapId);
// Pan using Google's map object
map._map.panBy(x, y);
Hope that helps!
@lindseydiloreto thanks for the tip, but how do I check if googleMaps
is available?.
When trying your code I (of course) get googleMaps is not defined
.
I can't find anything in the docs related to this.
If googleMaps
is not defined, it means some dynamic JS is trying to run before the plugin's JavaScript files have been properly loaded.
The docs for Required JS Assets describe why those files are important, and how they can be automatically or manually loaded.
I would like the use panBy but it seems to be missing in the Dynamic Maps JS.
The reason being is that we have something overlapping the Google Map and would like to offset the map a bit to counter this overlap.