Hi,
 We are using Custom Marker in the Google Map. But it is moving
whenever Zoomed Out, In other words it is changing the position. For
example we are putting custom marker  in the place "VarBerg". The
following code we applied for it.

Javascript Code
-----------------------

html xmlns="http://www.w3.org/1999/xhtml";>
<head runat="server">
    <title>Untitled Page</title>
    <script src="http://maps.google.com/maps?
file=api&amp;v=2&amp;key=ABQIAAAA28QYMiLBRG3MebP7sE8GnxRzN9az_vbfjHgqkFk0xs4SdvdTkBR37rsyznIxO7GP_Qkd_RxESBfqjw"
type="text/javascript"></script>
    <script type="text/javascript">
     function load() {
      var icon = new GIcon();
      icon.image = "images/gmap_icons/marker_green.png";
      icon.shadow = "images/gmap_icons/marker_gray.png";

      icon.iconSize = new GSize(25, 35);
      icon.shadowSize = new GSize(30, 35);
      icon.iconAnchor = new GPoint(10, 25);
      icon.infoWindowAnchor = new GPoint(31, 8);

      var map = new GMap(document.getElementById("map"));
      map.addControl(new GMapTypeControl());
      map.addControl(new GSmallMapControl());
      map.centerAndZoom(new GPoint(12.2492867243,57.1064397320),4);

      var point=new GPoint(12.2492867243,57.1064397320)
      addMarker(map, point, icon,"Varberg");

    }

    function addMarker(map, point, icon, strValue) {
      var marker = new GMarker(point, icon);
      map.addOverlay(marker);
      GEvent.addListener(marker, "click", function() {
        marker.openInfoWindowHtml('<div style="white-
space:nowrap">Place:  ' + strValue + '</div>');
      });
    }

    </script>



</head>
<body onload="load()">
    <form id="form1" runat="server">
    <div>
    <div id="map" style="width:700px; height:800px; border:1px solid
#979797"></div>
    </div>
    </form>
</body>
</html>

It would be helpful if anybody answer this question. It is very urgent.

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