I have used Creative Google Maps App, which has provision to customise the style, and I tried the code listed below, but this did not work (not sure if this is complete code?)
Any suggestions as to how I could offset this map?
Thanks for taking an interest!
___
var center; // a latLng
var offsetX = 0.75; // move center one quarter map width right
var offsetY = 0.5; // center
var span = map.getBounds().toSpan(); // a latLng – # of deg map spans
var newCenter = {
lat: center.lat() + span.lat()*offsetY,
lng: center.lng() + span.lng()*offsetX
};
map.setCenter(newCenter);
___
]]>center
is not assigned a value. It can be gotten from the map object. You need something like center = map.getCenter();
The map object’s getCenter method is something I made up as a quick example. Use the actual method or property.
This isn’t a WP issue though, it’s a Google maps coding issue. You’ll get people much more knowledgeable about maps coding than the folks here if you ask in the Google maps support forum.
]]>