Hey Everyone,

The map I have been trying to create, is really in my mind at least,
very simple. The one issue is I don't know what I am doing. I have
tried to cut and paste several different pieces of code from many
different sample pages from this group and other sites. What I am
stuck with now is one of Google Maps own sample pages simply because
it works.

This is what I need.
A map that uses a custom Marker Icon, uses it only once in the center
of the map and finally a zoom control.

Below is the code I am using. Like I said I don't know how to delete
sections and replace them without breaking the code and rendering the
map useless.

<script type="text/javascript">
            function initialize() {
      if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map_canvas"));
        map.setCenter(new GLatLng(<?php echo get_post_meta($post->ID,
'mapcords', true); ?>);
        map.setUIToDefault();

        // Create our "tiny" marker icon
        var blueIcon = new GIcon(G_DEFAULT_ICON);
        blueIcon.image = "wp-content/themes/northblue/images/
gmapnems.png";

                // Set up our GMarkerOptions object
                markerOptions = { icon:blueIcon };

        // Add 10 markers to the map at random locations
        var bounds = map.getBounds();
        var southWest = bounds.getSouthWest();
        var northEast = bounds.getNorthEast();
        var lngSpan = northEast.lng() - southWest.lng();
        var latSpan = northEast.lat() - southWest.lat();
        for (var i = 0; i < 10; i++) {
          var latlng = new GLatLng(southWest.lat() + latSpan *
Math.random(),
                                  southWest.lng() + lngSpan *
Math.random());
          map.addOverlay(new GMarker(latlng, markerOptions));
        }
      }
    }
function MM_jumpMenuGo(objId,targ,restore){ //v9.0
  var selObj = null;  with (document) {
  if (getElementById) selObj = getElementById(objId);
  if (selObj) eval(targ+".location='"+selObj.options
[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0; }
}
</script>

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