acwalker

Map service will not display over Google base layer

Discussion created by acwalker on Jul 11, 2012
Latest reply on Sep 9, 2013 by ballews
I have followed this tutorial and literally copied and pasted the code, the only thing I changed was to add my own unsecured map service in place of the ESRI layer.  This map service works in every other web-mapping application I have tested it with - JS and FLEX Viewer.  It does not appear over the Google layer though.  I have an open support ticket with ESRI that's been going for several weeks now.  Their developers agree that the code is valid and they have even duplicated the problem by trying to pull this same map service from my ArcGIS Server.  At this point ESRI is not able to provide a solution.  I believe there is a server configuration that needs to be changed because they were able to get a copy of this data and created their own service with it, and that worked.

Likewise, I've seen numerous web-maps where this same method of adding an in-house map service over the Google base layer works flawlessly.

I'm hoping someone has run into this and figured out a fix.

Here's the live map that will not display my map service.  My code is below.  Thanks for your help!

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml">
<head>
  <title>ArcGIS JavaScript Extension for the Google Maps API Example</title>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
  <script src="http://maps.google.com/maps?file=api&v=3&key=AIzaSyDZlBLE1DNYj8IgCIP4JzkEVs8bclKfr90" type="text/javascript"></script>
  <script src="http://serverapi.arcgisonline.com/jsapi/gmaps/?v=1.6" type="text/javascript" ></script>

  <script type="text/javascript">
  
    var gmap = null;

    function initialize() {
      gmap = new GMap2(document.getElementById("gmap"));
      var centerat = new GLatLng(28,-82.5);
      gmap.addControl(new GLargeMapControl());
      gmap.addControl(new GMapTypeControl());
      gmap.setCenter(centerat, 10);
      
      var dynamicMap = new esri.arcgis.gmaps.DynamicMapServiceLayer("http://map.entrix.com/ArcGIS/rest/services/Misc/RiverviewOfficePointsWGS84/MapServer", null, 1.0, dynmapcallback);
    }

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

  </script>
</head>
<body onload="initialize();" onunload="GUnload();">
<div id="gmap" style="width: 500px; height:500px;"></div>
</body>
</html>

Outcomes