User Tools

Site Tools


map_suite_style_guide_new

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
map_suite_style_guide_new [2017/02/17 03:14]
tgwikiupdate created
map_suite_style_guide_new [2018/03/02 16:40] (current)
sacha [Applying Styles Across ZoomLevels]
Line 6: Line 6:
  
 ===== What are Styles? ===== ===== What are Styles? =====
-Styles are classes which determine how each feature is represented on the map. Styles can be as simple as drawing a think black line to represent a street to advanced heat styles that represent multiple data points as smooth color gradients. ​ Different styles can be applied to the same data based on the particular map scale. ​You can in addition, with many stylesuse the tabular data associated with the feature to vary their look or even suppress drawing. ​ At their heart styles are where your data and drawing to the map control meet.  ​+Styles are classes which determine how each feature is represented on the map. Styles can be as simple as drawing a thick black line to represent a street to advanced heat styles that represent multiple data points as smooth color gradients. ​ Different styles can be applied to the same data based on the particular map scale. ​Additionally, with many styles ​you can use the tabular data associated with the feature to vary their look or even suppress drawing. ​ At their heart styles are where your data and drawing to the map control meet.  ​
  
-Map Suite provides a comprehensive set of styles which will cover most mapping requirements. ​ If you find the provided styles do not cover your scenarios then it is easy to create your own custom styles. ​ We have dedicated an entire section to creating your own customer styles below which includes a video and samples. ​ Using custom styles ​allow you to leverage your own creativity and knowledge of your specific scenarios.+Map Suite provides a comprehensive set of styles which will cover most mapping requirements. ​ If you find the provided styles do not cover your scenarios then it is easy to create your own custom styles. ​ We have dedicated an entire section to creating your own customer styles below which includes a video and samples. ​ Using custom styles ​allows ​you to leverage your own creativity and knowledge of your specific scenarios.
  
  
Line 17: Line 17:
   * **TextStyle** - Labels features on the map.   * **TextStyle** - Labels features on the map.
   * **ClassBreakStyle** - Used to render feature groups differently based on their data values, ie. 0-100 Red, 100-200 Blue.   * **ClassBreakStyle** - Used to render feature groups differently based on their data values, ie. 0-100 Red, 100-200 Blue.
-  * **ValueStyle** - Renders features ​differntly ​based on absolute values in their data, ie. MiddleSchool = Red, HighSchool=Blue.+  * **ValueStyle** - Renders features ​differently ​based on absolute values in their data, ie. MiddleSchool = Red, HighSchool=Blue.
   * **Many More..** ​ [[Map_Suite_Style_Guide#​Predefined_Styles|See the complete list below.]]   * **Many More..** ​ [[Map_Suite_Style_Guide#​Predefined_Styles|See the complete list below.]]
  
Line 59: Line 59:
   - **Spatial Query** - The Layer does a spatial query to retrieve any features inside of the current extent of the map.   - **Spatial Query** - The Layer does a spatial query to retrieve any features inside of the current extent of the map.
   - **ZoomLevel** - We determine, through the ZoomLevelSet,​ which zoom level we will pull styles from based on the maps current scale.   - **ZoomLevel** - We determine, through the ZoomLevelSet,​ which zoom level we will pull styles from based on the maps current scale.
-  - **Check Custom Styles** - We examine the appropriated ZoomLevel determine if there are sytles ​in the CustomStyle collection. ​ If so we draw these. +  - **Check Custom Styles** - We examine the appropriated ZoomLevel determine if there are styles ​in the CustomStyle collection. ​ If so we draw these. 
-  - **Default Styles** - If we do not find custom ​sytles ​then we examine the default styles to see if they have been changed by the user.  If the user has not modofed ​them then we do not use them to draw as their default state is to draw transparently.+  - **Default Styles** - If we do not find custom ​styles ​then we examine the default styles to see if they have been changed by the user.  If the user has not modified ​them then we do not use them to draw as their default state is to draw transparently.
   - **Invoke The Draw** - The layer takes the features it queried along with the GeoCanvas, used to draw on the map, and passes them to each of the styles that were valid.   - **Invoke The Draw** - The layer takes the features it queried along with the GeoCanvas, used to draw on the map, and passes them to each of the styles that were valid.
   - **Style Internals** - Inside of the Style we typically loop through each feature passed in and if it is of a type we expect, area type for area style, we call drawing methods such as DrawArea on the GeoCanvas passing in the pens, brushes, images, or fonts that is used by the style.   - **Style Internals** - Inside of the Style we typically loop through each feature passed in and if it is of a type we expect, area type for area style, we call drawing methods such as DrawArea on the GeoCanvas passing in the pens, brushes, images, or fonts that is used by the style.
-  - **GeoCanvas** - The GeoCanvas then receives the method calls and then draws, using native methods, onto the device the GeoCavnas ​was designed to draw upon.  For example the GdiPlusGeoCanvas will draw on a bitmap which the PdfGeoCanvas call native methods to render to a PDF.+  - **GeoCanvas** - The GeoCanvas then receives the method calls and then draws, using native methods, onto the device the GeoCanvas ​was designed to draw upon.  For example the GdiPlusGeoCanvas will draw on a bitmap which the PdfGeoCanvas call native methods to render to a PDF.
  
 ===== Zoom Levels ===== ===== Zoom Levels =====
Line 73: Line 73:
 In general styles are applied to a particular ZoomLevel. ​ A ZoomLevel is a particular range, in scale, where you want to style things differently. ​ Zoom levels are part of a ZoomLevelSet which is a collection of non overlapping zoom levels.  ​ In general styles are applied to a particular ZoomLevel. ​ A ZoomLevel is a particular range, in scale, where you want to style things differently. ​ Zoom levels are part of a ZoomLevelSet which is a collection of non overlapping zoom levels.  ​
  
-An analogy would be to think of yourself in space looking down at the earth. ​ At this level your scale might be 1 million. ​ This height, or view, would be represented as a particular ZoomLevel in a ZoomLevelSet ranging from 1, ground level, to 1 million. ​ As you descend towards the earth your scale changes and you would pass through other ZoomLevels on your way down.  One thing to note is that as you descend your view of the earth changes and things that were too small to see now come into focus and things that were visible higher are now lost.  In the same way your view you change we allow you to set different styles at different ZoomLevels so that you can adjust how things look depending on your current scale. ​ For some layer, like surface streets, you would not even have a style to represent them at scale 1 million. ​ This would cause them not to draw at all but conversely, at this scale, you may draw the capitols ​of the world as small dots to represent them.  As you zoom into the earth those dots may be replaced by polygons that show the borders of the city etc.  At a certain scale you would want to show the surface streets but possibly ​just as small thin black lines. ​ As you zoom further still the thin lines would change to thicker black lines with a which inner line.  ​+An analogy would be to think of yourself in space looking down at the earth. ​ At this level your scale might be 1 million. ​ This height, or view, would be represented as a particular ZoomLevel in a ZoomLevelSet ranging from 1, ground level, to 1 million. ​ As you descend towards the earth your scale changes and you would pass through other ZoomLevels on your way down.  One thing to note is that as you descend your view of the earth changes and things that were too small to see now come into focus and things that were visible higher are now lost.  In the same way your view you change we allow you to set different styles at different ZoomLevels so that you can adjust how things look depending on your current scale. ​ For some layer, like surface streets, you would not even have a style to represent them at scale 1 million. ​ This would cause them not to draw at all but conversely, at this scale, you may draw the capitals ​of the world as small dots to represent them.  As you zoom towards ​the earth those dots may be replaced by polygons that show the borders of the city etc.  At a certain scale you would want to show the surface streets but perhaps ​just as small thin black lines. ​ As you zoom further still the thin lines would change to thicker black lines with a thin inner line.  ​
  
 ==== Default Styles ==== ==== Default Styles ====
Line 80: Line 80:
 ==== Custom Styles ==== ==== Custom Styles ====
 ==== Applying Styles Across ZoomLevels ==== ==== Applying Styles Across ZoomLevels ====
-It is often the case you need to apply a single set of styles across a number of differnt ​ZoomLevels. ​ You may want, for example, surface streets to be drawn as a thin black line from ZoomLevel01 through ZoomLevel05. ​ It would be tedious to set the styles for each ZoomLevel between one through five.  To simplify this requirement we allow you to apply styles across ZoomLevels using the ApplyUntilZoomLevel API on the ZoomLevel itself. ​ Let's say you want a particular Style to be visible at ZoomLevel01 through ZoomLevel05. To make that work, we can simply code as follows:+It is often the case you need to apply a single set of styles across a number of different ​ZoomLevels. ​ You may want, for example, surface streets to be drawn as a thin black line from ZoomLevel01 through ZoomLevel05. ​ It would be tedious to set the styles for each ZoomLevel between one through five.  To simplify this requirement we allow you to apply styles across ZoomLevels using the ApplyUntilZoomLevel API on the ZoomLevel itself. ​ Let's say you want a particular Style to be visible at ZoomLevel01 through ZoomLevel05. To make that work, we can simply code as follows:
  
 //The code below applies all the styles in ZoomLevel01 to every ZoomLevel until ZoomLevel05. ​ In this way you can apply the same styles across a large range of ZoomLevels and save coding each ZoomLevel. ​ Remember to apply the ZoomLevels from smallest, 01, to the largest, 20.// //The code below applies all the styles in ZoomLevel01 to every ZoomLevel until ZoomLevel05. ​ In this way you can apply the same styles across a large range of ZoomLevels and save coding each ZoomLevel. ​ Remember to apply the ZoomLevels from smallest, 01, to the largest, 20.//
map_suite_style_guide_new.1487301276.txt.gz · Last modified: 2017/02/17 03:14 by tgwikiupdate