This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
map_suite_layers [2015/11/18 21:40] mwolffer [Overview] |
map_suite_layers [2015/12/03 09:29] (current) tgwikiupdate [Video Overview] |
||
---|---|---|---|
Line 5: | Line 5: | ||
<div newline></div> | <div newline></div> | ||
+ | <div download_viewsource_buttons tryitonline> | ||
+ | {{filehistory:webapieditionsample_layers_cs_20150820.zip|C# Project}} | ||
+ | [[source_code_webapieditionsample_layers.zip|View Source]] | ||
+ | [[http://samples.thinkgeo.com/WebApiEdition/SampleTemplates/Layers/leaflet/|Try It Online(Leaflet)]] | ||
+ | [[http://samples.thinkgeo.com/WebApiEdition/SampleTemplates/Layers/openlayers/|Try It Online(Openlayers)]] | ||
+ | |||
+ | </div> | ||
=====Overview===== | =====Overview===== | ||
- | Map Suite WebAPI Edition supports many popular GIS file fomrats. Data is contained in layers. In this learning sample, we will go over the concept of a layer and explain how they are used to make a map. The different types of layers will be discussed. | + | Map Suite WebAPI Edition supports many popular GIS file formats. In this learning sample we will go over some of the most common supported GIS data formats and also discuss the concept of a layers and how they are used to create maps. |
=====What is a Layer?===== | =====What is a Layer?===== | ||
- | A layer is a visual representation of geospatial data. The data could be the terrain of the earth, roads, points of interest, geopolitical boundaries, or any other data to be displayed on the map. Maps are made by displaying one or more layers. | + | A layer is a visual representation of geospatial data. You can think of layers much like actual terrain in the real world. The bare earth might be a layer and have either physically defined boundaries, such as a fence around a military installation, or legal boundaries, such as the border of a country. Another layer on top of that might be roads that are built upon the bare earth. It is important to understand this when working with layers, as they need to be added in the logical order you might expect so that they can be visualized correctly from above. In other words, you would not want to lay down roads and then cover them with earth, because they could not be seen or used by vehicles. |
=====Types of Layers===== | =====Types of Layers===== | ||
- | There are three types of layers that are supported by all editions of Map Suite: Vector, Raster, and Web-Based. Vector data contains points, lines, and polygons and is useful for storing data that has discrete boundaries, such as country borders, land parcels, and streets. Raster data contains a matrix of pixels and is used for digital images like aerial imagery, floor plans, or topographic maps. Web-based data comes in a variety of forms. It could be basemaps served by Google or Bing. Or it could be near-real-time information like NOAA weather data. Check out the [[Map_Suite_Data_Format_Guide|Map Suite Data Format Guide]] to see all the formats that are supported by Map Suite. | + | There are three types of layers that are supported by all editions of Map Suite: Vector, Raster, and Web-Based. Vector is one of the most popular GIS data formats and may contain points, lines, and polygons. It is useful for storing data that has discrete boundaries, such as country borders, land parcels, and streets. Raster data contains a matrix of pixels and is used for digital images such as aerial imagery, floor plans, or topographic maps. Web-based data comes in a variety of forms. It could be basemaps served by Google or Bing. It could be data such as NOAA weather information. Check out the [[Map_Suite_Data_Format_Guide|Map Suite Data Format Guide]] to see all the formats that are supported by Map Suite. |
- | In this learning sample, there is an example of each of these types of layers: | + | In this learning sample we will go over some of the most popular types of of layers: |
**Vector** | **Vector** | ||
Line 40: | Line 47: | ||
* WMS | * WMS | ||
- | There is also a customized layer that contains custom vector data to demonstrate that it is possible to create a layer from any type of data. | + | There is also a customized layer that contains custom vector data to demonstrate the extensibility of Map Suite and how you can integrate almost any type of data format. |
=====Overlays===== | =====Overlays===== | ||
- | In order to better control layers and assist with caching, layers may be grouped into overlays. All layers in an overlay will generate one bitmap. The caching happens at the overlay level where the bitmap is generated. | + | In order to better manage layers and to benefit from caching layers may be grouped as overlays. All layers in an overlay will generate one bitmap. Caching occurs at the overlay level where the bitmap is generated. |
- | =====Style the Layers===== | + | =====Styling the Layers===== |
- | Make sure to order the layers so that they are drawn appropriately. The order of the layers will determine what is visible, as the layers sit on top of one another. Think about the order in the real world. On the bottom, put the area-based terrain layers, such as land and water. Next, put features like roads that sit on top of the terrain. Finally, put points of interest, or POIs, on top of the physical features. | + | The order of your layers is very important and will determine what is visible. You would create and add layers based on how they should be viewed, so naturally you might start with some polygons, such as the outline of a country and all of the regions within it. You might then lay down lines that represent rivers and roads and then finally you might lay down points like cities or places of interest. Again, keep in mind that logic will dictate what works best. For instance, laying down roads and then rivers would put rivers on top of roads when it should more than likely be the other way around (the exception here might be a tunnel!). |
=====A Look at the Code===== | =====A Look at the Code===== | ||
- | There are two projects in the Visual Studio solution. One is for the Leaflet javascript mapping library and one is for OpenLayers. In each project, the LayersController contains the functions that load each of the layer types. Each function is prefaced with the type of layer. At the bottom is InitializeProjection, which sets up the map projection, and DrawTileImage, which draws the Layer Overlay bitmap. The App_Data folder contains data for each of the layer types. | + | There are two projects in the Visual Studio solution. One is for the Leaflet javascript mapping library and one is for OpenLayers. In each project the LayersController contains the function that loads each layer type. Each function is prefaced with the type of layer. At the bottom is InitializeProjection which sets up the map projection and DrawTileImage which draws the Layer Overlay bitmap. The App_Data folder contains data for each of the layer types. |