I have a map that is here
http://alpha.clickablecommunity.com/Default.aspx
It loads fine in FF and IE 7 but only loads partially in IE 8. I have
no idea why. Can anyone help me. Here is the code that loads the map
<%@ Control Language="vb" AutoEventWireup="false"
CodeBehind="Map.ascx.vb" Inherits="ClickableCommunity.Map" %>
    <script src="http://maps.google.com/maps?
file=api&amp;v=2&amp;sensor=false&amp;key=ABQIAAAANvmC5YwARPSDAHoiTGyjXRR-496V5WiR7LkdzcFVQzFkDe07hhSkvWarTS8udi3TGEWMPQwT-
FAGew"
        type="text/javascript"></script>

    <script type="text/javascript">

        function loadEarth(mapdiv) {

            if (GBrowserIsCompatible()) {

                var point;
                if (!mapdiv) return true;

                //find the div
                map = new GMap2(document.getElementById(mapdiv));

                //this will add a map overview in the bottom
                //right hand corner
                //map.addControl(new GOverviewMapControl());

                //enable the zooming
                map.enableDoubleClickZoom();
                map.enableScrollWheelZoom();

                //add the different map types i.e. satellite street
hybrid
                map.addControl(new GMapTypeControl());
                //add the zoom + and - buttons
                map.addControl(new GLargeMapControl());

                //call the function that adds the menu
                //when the user right clics
                //createContextMenu(map);

                //set the center, position, and type of map to start
with
                map.setCenter(new GLatLng(40.7001, -99.0844), 15);
                map.setMapType(G_NORMAL_MAP);

                geocoder = new GClientGeocoder();

                //if we wanted to draw a polyline we would uncomment
this code

                //var polyline = new GPolyline([new GLatLng(37.4419,
-122.1419),
                //new GLatLng(37.4519, -122.1519),
                //new GLatLng(37.4619, -122.1819)], "#3333cc", 10);
                //map.addOverlay(polyline);

            } //if gbrowseriscompatible
            else {
                document.getElementById(mapdiv).innerHTML = "Sorry,
your browser is not compatible" +
                                                        "with our maps
application<br>" +
                                                        "Please try
updating to a newer version of your browser.";
            }

        } //loadEarth

        function createContextMenu(localmap) {
            contextmenu = document.createElement("rightClickDiv");
            contextmenu.style.visibility = "hidden";
            contextmenu.style.background = "#ffffff";
            contextmenu.style.border = "1px solid #8888FF";

            contextmenu.innerHTML = "<a href='javascript:zoomIn()'>" +
                                                                        "<div 
class='context'>  Zoom in  </div></a>" +
                                                                        "<a 
href='javascript:zoomOut()'>" +
                                                                        "<div 
class='context'>  Zoom out  </div></a>" +
                                                                        "<a 
href='javascript:zoomInHere()'>" +
                                                                        "<div 
class='context'>  Zoom in here  </div></a>" +
                                                                        "<a 
href='javascript:zoomOutHere()'>" +
                                                                        "<div 
class='context'>  Zoom out here  </div></a>" +
                                                                        "<a 
href='javascript:centerMapHere()'>" +
                                                                        "<div 
class='context'>  Centre map here  </div></a>";

            localmap.getContainer().appendChild(contextmenu);
            GEvent.addListener(localmap, "singlerightclick",
                              function(pixel, tile) {
                                  clickedPixel = pixel;
                                  var x = pixel.x;
                                  var y = pixel.y;
                                  if (x > localmap.getSize().width - 120) {
                                      x = localmap.getSize().width - 120
                                  } //if
                                  if (y > localmap.getSize().height - 100) {
                                      y = localmap.getSize().height - 100
                                  } //if
                                  var pos = new 
GControlPosition(G_ANCHOR_TOP_LEFT, new
GSize(x, y));
                                  pos.apply(contextmenu);
                                  contextmenu.style.visibility = "visible";
                              } //function(pixel, tile)
                     ); //GEvent.addListener

            GEvent.addListener(localmap, "click",
                         function() {
                             contextmenu.style.visibility = "hidden";
                         } //function
                     ); //GEvent.addlistener
        } //createContextMenu
        function zoomIn() {
            localmap.zoomIn();
            contextmenu.style.visibility = "hidden";
        } //zoomIn
        function zoomOut() {
            localmap.zoomOut();
            contextmenu.style.visibility = "hidden";
        } //zoomOut
        function zoomInHere() {
            var point = map.fromContainerPixelToLatLng(clickedPixel)
            localmap.zoomIn(point, true);
            contextmenu.style.visibility = "hidden";
        } //zoomInHere
        function zoomOutHere() {
            var point = map.fromContainerPixelToLatLng(clickedPixel)
            localmap.setCenter(point, map.getZoom() - 1);
            contextmenu.style.visibility = "hidden";
        } //zoomOutHere
        function centerMapHere() {
            var point = map.fromContainerPixelToLatLng(clickedPixel)
            localmap.setCenter(point);
            contextmenu.style.visibility = "hidden";
        } //centerMapHere

    </script>
<div id="divMap">
</div>

Thanks,

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to