ArcGIS API for Silverlight Development Series II: cache layer and dynamic layer and layer Summary

Source: Internet
Author: User
Tags silverlight

As a part of ESRI platform ArcGIS API for Silverlight, it is naturally related to other ESRI products. In the previous article, we made a map browsing program, which is indeed very simple. It's just a bit hard to understand: <ESRI: arcgistiledmapservicelayer id = "mylayer" url = "http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"
/> What does this mean. To understand this problem, we have to mention the concept of layers.

Arcgistiledmapservicelayer: it is a cache layer. By caching the map data slices in the server hard disk in advance, the service will calculate the displayed image and return it to the client when accessing the client. The client can see the map, which is actually composed of several images.

Arcgisdynamicmapservicelayer: it is a dynamic layer, and the dynamic layer is not sliced in advance. When the client accesses the layer, the service generates an image in real time and returns it to the client. This obvious speed is better than the cached layer.

Therefore, we can publish a map as a basic data map (such as a basic map of Shanghai) as a cache map because the basic map will not change, in this case, we will pre-slice the cache. In order to meet our business needs, special maps (such as street lamp information in the power industry) will be released as dynamic layers, so that such information will change frequently, caching is meaningless.

Of course, these two layers can be combined. In this way, we can meet our general map development functions. The following is an example of overlay:

<ESRI: Map x: Name = "mymap" wraparound = "true">
<ESRI: arcgistiledmapservicelayer id = "streetmaplayer"
Url = "http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"

Initializationfailed = "layer_initializationfailed"/>
<ESRI: arcgisdynamicmapservicelayer id = "dynamiclayer"
Url = "http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Earthquakes/RecentEarthquakesRendered/MapServer"
Initializationfailed = "layer_initializationfailed"/>
</ESRI: Map>

The following system summarizes the layer structure in ArcGIS API for Silverlight.

Layer
| -- Tiledmapservicelayer
| -- Arcgistiledmapservicelayer
| -- Dynamiclayer
| -- Dynamicmapservicelayer
| -- Arcgisdynamicmapservicelayer
| -- Arcgisimageservicelayer
| -- Gpresultimagelayer
| -- Graphicslayer
| -- Featurelayer
| -- Elementlayer

1. Layer:
Inherited from dependencyobject in Silverlight and implemented the inotifypropertychanged interface, which is the base class of other layers in Silverlight API.

2. tiledmapservicelayer:
Inherited from layer, is the base class of all map services that use the cache. It can be used to add cached map services from different data sources to the program. For example, ArcGIS Server's map service, Google map, and virtual Earth map;

3. arcgistiledmapservicelayer:
Inherited from tiledmapservicelayer. As mentioned above, this layer extends tiledmapservicelayer and supports the cached Map Service released by arcgisserver 9.3.

4. dynamiclayer:
Inherited from layer, which is the base class of the dynamic map service;

5. dynamicmapservicelayer:
Inherited from dynamiclayer, corresponding to tiledmapservicelayer. To use an Uncached dynamic map service, you must extend this layer.

6. arcgisdynamicmapservicelayer:
It inherits from dynamicmapservicelayer and is applicable to the dynamic map service released in ArcGIS server9.3. Similarly, if you want to use other dynamic map services in the client API, such as the WMS service of OGC, you also need to extend the above dynamicmapservicelayer to implement it like this layer;

7. arcgisimageservicelayer:
Inherited from dynamicmapservicelayer, the image service for imageservice released by ArcGIS Server 9.3 is also a dynamic map service. In the client API, you can use the attributes of arcgisimageservicelayer to conveniently display the image data on the server through a browser, such as the bandids attribute, you can quickly adjust the combination of image data display bands (RGB channel) and provide different results for users to view. Click here at http://server).esri.com/javascript_examples/image_service_band_spinners.html,;
8. gpresultimagelayer:
It inherits from dynamicmapservicelayer and is applicable to the results produced by the geoprocessing service. You can request the GP service on the server to dynamically generate an image and add the image to the map control as a gpresultimagelayer layer;
9. graphicslayer:
Inherited from layer. This layer generally meets the elements presented when we interact with the map. For example, if a box is enlarged, we can see a rectangle drawn by the mouse. For example, when querying a point of interest, the results usually highlight the shape of the point of interest that meets the conditions. It is generally used for GPS location tracking.

10. featurelayer:
Inherited from graphicslayer, which is also one of the highlights of the Silverlight API. It can be used to complete a dazzling Topic Map Renderer.
11. elementlayer:
Inherited from layer, which can be used to present the original frameworkelement in Silverlight, such as video and audio. Although the fill class can also be used to display a video in fillsymbol's fill attribute, after all, some "stingy" elements can be placed by the other side in elementlayer. You may ask, isn't Silverlight in layout elements such as grid in addition to map controls possible? Why should they be placed in elementlayer? In fact, there is a problem that often plagued GIS developers, that is, to make some non-geographical data elements change with the MAP range (zoom in, zoom out, and PAN, instead of Manually changing the positions of these elements, you do not have to recalculate the client coordinates after extent changes. Look, elementlayer is solving this problem.

As there are so many layers, we focus on the red-labeled layers. General GIS development is enough.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.