javascript - Anchoring a google map to right side of its container -
I have seen that the Google Maps API (and Google Maps in general) always maps anchor to the left hand side Their containers, like (resize window)
I have an anchorage where I would like the map to anchor to the right hand side. I am not getting anything in the API docs while mentioning this. Is this possible?
On resizing, an event suggests to re-map the map with the listener, but this is not good because I am looking for the effect of a sidebar panel and the 'Top' map rather the side Push it for it and then later in the map again than in the center itself.
How about adding event listeners to the event?
google.maps.event.addListener (map, 'resize', function (event) {map.setCenter (myLocation); //});
This map will focus on changing the shape of the div with smoothly
Note:
- You may have to create a shape
- 'Map' is a map type object from the Google API
- 'MyLocation' is a moving object
var MyLocation = new google.maps.LatLng (-33.679216211612086,151.3031796875);
Comments
Post a Comment