Select to view content in your preferred language

no display my MapServer when i add multi map serviecs (MapServer)

1859
2
10-14-2014 06:10 PM
lasinh
by
New Contributor III

i have link MapServer(cached)  http://localhost:6080/arcgis/rest/services/NenChung2909  i want add  this MapServer above Esri MapServer, but when i add two MapServer then my MapServer isnot show, Esri MapServer is show. please help me! thank you! This is my code:

 

<!DOCTYPE html>

<html>

  <head>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

    <!--The viewport meta tag is used to improve the presentation and behavior of the samples

      on iOS devices-->

    <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">

    <title>Terrain basemap with custom data</title>

    <link rel="stylesheet" href="http://js.arcgis.com/3.11/dijit/themes/claro/claro.css">

    <link rel="stylesheet" href="http://js.arcgis.com/3.11/esri/css/esri.css">

    <style>

      html, body { height: 100%; width: 100%; margin: 0; padding: 0; }

      #map{padding:0;}

    </style>

 

 

    <script>var dojoConfig = {parseOnLoad: true};</script>

    <script src="http://js.arcgis.com/3.11/"></script>

    <script>

      dojo.require("dijit.layout.BorderContainer");

      dojo.require("dijit.layout.ContentPane");

      dojo.require("esri.map");

     

      var map;

 

 

      function init() {

        map = new esri.Map("map", {

       

        });

        //Add the terrain service to the map. View the ArcGIS Online site for services http://arcgisonline/home/search.html?t=content&f=typekeywords:service   

        var basemap = new esri.layers.ArcGISTiledMapServiceLayer("http://server.arcgisonline.com/ArcGIS/rest/services/World_Terrain_Base/MapServer");

        map.addLayer(basemap);

       

         var layer = new esri.layers.ArcGISTiledMapServiceLayer("http://localhost/arcgis/rest/services/NenChung2909/NenChungDongNai/MapServer");

          map.addLayer(layer);

 

 

        //add custom services in the middle. This is typically data like demographic data, soils, geology etc.

        //This layer is typically partly opaque so the base layer is visible.

      

      }

 

 

      dojo.ready(init);

    </script>

  </head>

 

  <body class="claro">

    <div data-dojo-type="dijit.layout.BorderContainer"

         data-dojo-props="design:'headline', gutters:false"

         style="width: 100%; height: 100%; margin: 0;">

     

      <div id="map"

           data-dojo-type="dijit.layout.ContentPane"

           data-dojo-props="region:'center'"

           style="overflow:hidden;">

      </div>

 

 

    </div>

  </body>

</html>

 

I see sample of esri add three MapServer this sample worked perfect. Link this sample:

Add a terrain basemap with operational layer | ArcGIS API for JavaScript

0 Kudos
2 Replies
KenBuja
MVP Esteemed Contributor

Was you map service cached with the same parameters (tile dimensions and scales) that are used by the Esri basemaps? Take a look at this page: Designing a map to overlay ArcGIS Online, Google Maps, or Bing Maps

If you map was cached with different parameters, either it will be visible or the Esri basemaps will be visible, but they both will not be visible at the same time.

0 Kudos
lasinh
by
New Contributor III

no, my map cached sacle and dimensions by my definition, thank you repply

0 Kudos