Is anyone on this list using ArcGIS Server, and if so have you managed to
incorporate ArcGIS Server with the Google Maps v3 API?

The example at
http://resources.esri.com/help/9.3/arcgisserver/apis/javascript/gmaps/help/google_start.htmworks
fine if I copy it directly, ie using the v2 API to Google Maps.

But if I replace the gmap object with the v3 API version, only the Google
Map shows - the ArcGIS Server layer is not added over the top. Has the
addOverlay method changed in v3, and does it support an ArcGIS Server layer?

The v3 code appears below. Any clues?

Thanks,
Steve

<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<script type="text/javascript" src="
http://maps.google.com/maps/api/js?sensor=false";></script>
<script src="http://serverapi.arcgisonline.com/jsapi/gmaps/?v=1.6";
type="text/javascript" ></script>

<script type="text/javascript">
  function initialize() {
    var latlng = new google.maps.LatLng(0,0);
    var myOptions = {
      zoom: 2,
      center: latlng,
      mapTypeId: google.maps.MapTypeId.ROADMAP
    };
    var gmap = new google.maps.Map(document.getElementById("gmap"),
myOptions);
    var dynamicMap = new esri.arcgis.gmaps.DynamicMapServiceLayer
      ("
http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Population_World/MapServer
",
      null, 0.75, dynmapcallback);
  }

  function dynmapcallback(mapservicelayer) {
      gmap.addOverlay(mapservicelayer);
  }


</script>
</head>
<body onload="initialize()">
  <div id="gmap" style="width:100%; height:100%"></div>
</body>
</html>

-- 
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 google-maps-js-api...@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to