On 24 June 2011 13:16, Arisztokrata <[email protected]> wrote:
> Helping you wrote, thank you.
> As I looked at the example source code, and copied it. It has its own image,
> but I can not change the coordinates.
> http://code.google.com/intl/hu-HU/apis/maps/documentation/javascript/examples/groundoverlay-simple.html
> How can I do?
This creates the overlay image, fitting it to "imagebounds":
var oldmap = new google.maps.GroundOverlay(
"http://www.lib.utexas.edu/maps/historical/newark_nj_1922.jpg",
imageBounds);
imagebounds is a rectangle defined by its corners:
var imageBounds = new google.maps.LatLngBounds(
new google.maps.LatLng(40.712216,-74.22655),
new google.maps.LatLng(40.773941,-74.12544));
So to alter the coordinates of the overlay, you alter those coordinates.
Don't forget to change the map centre, as well.
--
You received this message because you are subscribed to the Google Groups
"Google Maps JavaScript API v3" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-maps-js-api-v3?hl=en.