arcgis adds tile layer to solve the problem of slow layer loading

       In order to improve the speed at which users can browse map information, after the map template is created, the map template needs to be published and then sliced, that is, the published map template is cut into map pictures according to a certain scale. When the user's needs change, the map template changes accordingly, while the static map image does not change automatically, so the map image needs to be updated so that the map image is consistent with the map template.

1. Publish the tile service. Remember, if the published tile service needs to be superimposed on the basemap, you must select the same caching scheme as the basemap for tile caching, otherwise the overlay will not be on the basemap.

2. Add a layer to the map (there is no click event on the tile layer, if you need to pop up the details of the current click, you can set infoTemplates for the layer)

     wp: {
 id: "xiaobanwp",
            title: "Small class query tile layer",
            visible:true,
            opacity: 0.5,
             index:20,

              url: "192.168.6.77:6080/arcgis/rest/services/yl/Wp/MapServer"
            }

 layer = new ArcGISTiledMapServiceLayer(wp.url,wp);

            // layer.setInfoTemplates(infoTemplates);
             map.addLayer(layer);

3. Tile layer dynamic update cache processing method

   Method 1 Write a script in python language and call it with js to update the local image cache

Related links: http://www.doc88.com/p-7758381126026.html


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325898049&siteId=291194637