User Tools

Site Tools


map_suite_samples_applies_to

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
map_suite_samples_applies_to [2015/09/10 08:51]
admin [Map Suite Samples Applies To]
map_suite_samples_applies_to [2015/10/10 07:31] (current)
Line 10: Line 10:
  
 =====Download the Sample===== =====Download the Sample=====
-{{Filelink|[[:​File:MapSuite Samples.zip|Download the Sample]]|0.99 MB}}+<faicon fa fa-download> ​{{filehistory:MapSuite Samples.zip|Download the Sample}} //(0.99 MB)//
  
 ====Map Suite Services Edition==== ====Map Suite Services Edition====
 To display the HeatLayer with Services Edition, please open “Visual Studio” -> “Add New Project” -> Select “Windows Forms Application” template, and then add “MapSuiteCore” reference and a “PictureBox” control used for showing map.  The code is simple and understandable like below: To display the HeatLayer with Services Edition, please open “Visual Studio” -> “Add New Project” -> Select “Windows Forms Application” template, and then add “MapSuiteCore” reference and a “PictureBox” control used for showing map.  The code is simple and understandable like below:
-<source lang="csharp">+<code csharp>
 ShapeFileFeatureSource featureSource = new ShapeFileFeatureSource(@"​..\..\Data\quksigx020.shp"​);​ ShapeFileFeatureSource featureSource = new ShapeFileFeatureSource(@"​..\..\Data\quksigx020.shp"​);​
 HeatLayer heatlayer = new HeatLayer(featureSource);​ HeatLayer heatlayer = new HeatLayer(featureSource);​
Line 28: Line 28:
 mapEngine.DrawDynamicLayers(bitmap,​ GeographyUnit.DecimalDegree);​ mapEngine.DrawDynamicLayers(bitmap,​ GeographyUnit.DecimalDegree);​
 mapEngine.CloseAllLayers();​ mapEngine.CloseAllLayers();​
-</source>+</code>
  
 ====Map Suite Desktop Edition==== ====Map Suite Desktop Edition====
 Displaying HeatLayer using Desktop Edition is very similar to the code in Service Edition, the biggest difference is that we need to reference “MapSuiteDesktop.dll” and use “Map Suite Desktop Map” to host and render the layer. Please see the code below: Displaying HeatLayer using Desktop Edition is very similar to the code in Service Edition, the biggest difference is that we need to reference “MapSuiteDesktop.dll” and use “Map Suite Desktop Map” to host and render the layer. Please see the code below:
-<source lang="csharp">+<code csharp>
 ShapeFileFeatureSource featureSource = new ShapeFileFeatureSource(@"​..\..\Data\quksigx020.shp"​);​ ShapeFileFeatureSource featureSource = new ShapeFileFeatureSource(@"​..\..\Data\quksigx020.shp"​);​
 HeatLayer heatlayer = new HeatLayer(featureSource);​ HeatLayer heatlayer = new HeatLayer(featureSource);​
Line 45: Line 45:
 overlay.Layers.Add(heatlayer);​ overlay.Layers.Add(heatlayer);​
 winformsMap1.Overlays.Add("​HeatOverlay",​ overlay); winformsMap1.Overlays.Add("​HeatOverlay",​ overlay);
-</source>+</code>
  
 ====Map Suite Wpf Desktop Edition==== ====Map Suite Wpf Desktop Edition====
 WPF (Windows Presentation Foundation) is the next generation rendering user interfaces in Windows-based applications. It also can be used to display the HeatLayer using Map Suite Wpf Desktop Edition. Please check the code below, and you may find the code is same to the one used in Desktop Edition. WPF (Windows Presentation Foundation) is the next generation rendering user interfaces in Windows-based applications. It also can be used to display the HeatLayer using Map Suite Wpf Desktop Edition. Please check the code below, and you may find the code is same to the one used in Desktop Edition.
  
-<source lang="csharp">+<code csharp>
 ShapeFileFeatureSource featureSource = new ShapeFileFeatureSource(@"​..\..\Data\quksigx020.shp"​);​ ShapeFileFeatureSource featureSource = new ShapeFileFeatureSource(@"​..\..\Data\quksigx020.shp"​);​
 HeatLayer heatlayer = new HeatLayer(featureSource);​ HeatLayer heatlayer = new HeatLayer(featureSource);​
Line 63: Line 63:
 overlay.Layers.Add(heatlayer);​ overlay.Layers.Add(heatlayer);​
 Map1.Overlays.Add(overlay);​ Map1.Overlays.Add(overlay);​
-</source>+</code>
  
 ====Map Suite Web Edition==== ====Map Suite Web Edition====
 To view the HeatLayer on the website, please create a “Web Application” with “Visual Studio”, reference the “MapSuiteCore.dll” and “WebEdition.dll” to the project, and then add the code as following to Page_Load method. To view the HeatLayer on the website, please create a “Web Application” with “Visual Studio”, reference the “MapSuiteCore.dll” and “WebEdition.dll” to the project, and then add the code as following to Page_Load method.
  
-<source lang="csharp">+<code csharp>
 if (!IsPostBack) if (!IsPostBack)
 { {
Line 92: Line 92:
 } }
  
-</source>+</code>
  
 ====Map Suite Silverlight Edition==== ====Map Suite Silverlight Edition====
Line 99: Line 99:
 **Client Side:** **Client Side:**
  
-<source lang="csharp">+<code csharp>
 Map1.MapUnit = GeographyUnit.DecimalDegree;​ Map1.MapUnit = GeographyUnit.DecimalDegree;​
  
Line 109: Line 109:
  
 Map1.CurrentExtent = new RectangleShape(-125,​ 47, -67, 25); Map1.CurrentExtent = new RectangleShape(-125,​ 47, -67, 25);
-</source>+</code>
  
 **Server Side:** **Server Side:**
  
-<source lang="csharp">+<code csharp>
 if (!Page.IsPostBack) if (!Page.IsPostBack)
 { {
Line 130: Line 130:
     SilverlightMapConnector1.ServerLayerOverlays.Add(layerOverlay);​     SilverlightMapConnector1.ServerLayerOverlays.Add(layerOverlay);​
 } }
-</source>+</code>
 You now know why these samples are marked with “Applies To Desktop, Web, Silverlight,​ Services, Wpf”, because they can use in any Map Suite product with almost the same code. If you still have any questions please download the attached samples or contact support@thinkgeo.com for detail. You now know why these samples are marked with “Applies To Desktop, Web, Silverlight,​ Services, Wpf”, because they can use in any Map Suite product with almost the same code. If you still have any questions please download the attached samples or contact support@thinkgeo.com for detail.
  
map_suite_samples_applies_to.1441875109.txt.gz · Last modified: 2015/09/10 08:51 by admin