I probably don’t know the keywords to search, and am not able to google for a solution so far.
Let’s say a map div is 200px x 200px (width x height). When we display Google Maps, the map is automatically centered, where the marker is at the center of the map, roughly the marker appear at 100px x 100px coordinates.
How can I move the map to show the marker 20px from left, say 20px x 100px coordinates?
Thanks.
Stupid me. The
centerin map options suffices:https://developers.google.com/maps/documentation/javascript/reference#MapOptions
The
+ 0.003will align the focus to the left horizontally. Play around with the coordinates to align the focus.