Wasn't it Patrick who wrote:
> My most important thing I want to achieve in this issue, is that I do
>not want to see the orange / pink background at all.
You might be able to deal with that by preloading your image.
Unfortunately that's going to require a bit of code rearrangement.
Also, EInsert.groundOverlay() runs a little faster than
GGroundOverlay(), because it just displays the image directly rather
than attempting to adjust the imagery to conform to the Mercator
projection. (With the something the size of a hospital, the differences
due to the Mercator projection should be much less than a pixel.)
What you'd need to end up with is the creation of your map happening in
an onload function, rather than in inline code, so that it happens after
the page load is complete. (Remember to create your "map" and "hosp"
variables as globals.)
Then add the preloading of the overlay.jpg image in inline code, so that
it happens before the onload event.
<script src="einsert.js" type="text/javascript"></script>
...
var map;
var hosp;
var image = new Image();
image.src = "overlay.jpg";
function load() {
map = new GMap2(document.getElementById("map"));
map.addControl(new GLargeMapControl());
map.addControl(new GMapTypeControl());
map.setCenter(new GLatLng(53.34010, -6.29563), 17);
hosp = EInsert.groundOverlay("overlay.jpg",
new GLatLngBounds(new GLatLng(53.33777, -6.30147),
new GLatLng(53.34239, -6.29048)));
map.addOverlay(hosp);
}
'''
<body onunload="GUnload()" onload="load()">
--
http://econym.org.uk/gmap
The Blackpool Community Church Javascript Team
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Maps API" 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-API?hl=en
-~----------~----~----~----~------~----~------~--~---