User Tools

Site Tools


map_suite_services_edition_layers

This is an old revision of the document!


ENC Viewer for displaying S-57 (*.000) File

{|class=“wikitable” cellpadding=“3” !Screenshot !width=78|Sample !width=66|Product !Description

This tool takes use of Map Suite HydrographyExtension to display ENC data in compliance with the latest version of ECDIS Presentation Library Edition 4.0, which is defined by the International Hydrographic Organization (IHO) in the special publication S-52.

NOTE: the styling file “NauticalCharts.xml” for drawing S-57 (*.000) file is included in the source code package.

GPS EXchange Format FeatureLayer

{|class=“wikitable” cellpadding=“3” !Screenshot !width=78|Sample !width=66|Product !Description

C# Download<br><br>Need it in another language?

Maritime S57 FeatureLayer

{|class=“wikitable” cellpadding=“3” !Screenshot !width=78|Sample !width=66|Product !Description

C# Download<br><br>Need it in another language?

NOTE: This sample works with Map Suite development branch daily build 9.0.31.0 or later, Map Suite Unmanaged Dependencies 9.0.31.0.msi or later needs to be installed. |} ===Build Custom Shapefile Indexes=== {|class=“wikitable” cellpadding=“3” !Screenshot !width=78|Sample !width=66|Product !Description |- |250px |View Source<br><br>C# Download<br><br>Need it in another language? |Services <br><br>Applies To: Desktop <br> Web <br> Silverlight <br> Services <br> Wpf <br> |This sample shows how you can display a subset of a shapefile without splitting the physical shapefile. For example, you may have a single shapefile that contains both highways and local roads. To improve display speed, you may be temped to split it into two separate shapefiles so you can quickly display local roads with one style and highways with another style (and avoid using a value style, which can be slow). But at this project demonstrates, rather than split your shapefile you can simply build two custom indexes, one for each road type. Then, when you create your ShapeFileFeatureLayer, you'll simply use your original shapefile and specify a custom index. Each custom index will limit the records that can be seen by the Layer, making it very fast and efficient. |} ===CAD FeatureLayer=== {|class=“wikitable” cellpadding=“3” !Screenshot !width=78|Sample !width=66|Product !Description |- |250px |View Source<br><br>C# Download<br><br>Need it in another language? |Services <br><br>Applies To: Desktop <br> Web <br> Silverlight <br> Services <br> Wpf <br> |This sample demonstrates how you can read data from an CAD file(*.dwg, *.dxf) in your Map Suite GIS applications, and how to render it with CAD embedded style as well as a customized style. It works with Map Suite daily development build version 7.0.46.0 or later, and Setup Unmanaged Dependencies 7.0.46.0 or later needs to be installed to make the sample work. This Cad File support would work in all of the Map Suite controls such as WPF Desktop Edition, Silverlight Edition, Web Edition, MVC Edition. The CAD dependencies assemblies can be downloaded from http://wiki.thinkgeo.com/wiki/File:MapSuiteCADDependencies8.0.109.0.zip |} ===TAB FeatureLayer With Embed Style === {|class=“wikitable” cellpadding=“3” !Screenshot !width=78|Sample !width=66|Product !Description |- |250px |View Source<br><br>C# Download<br><br>Need it in another language? |Services <br><br>Applies To: Desktop <br> Web <br> Silverlight <br> Services <br> Wpf <br> |This sample demonstrates how you can read data from an Tab file(*.tab) in your Map Suite GIS applications, and how to render it with Tab embedded style as well as a customized style. It works with Map Suite daily development build version 8.0.208.0 or later. This Tab File support would work in all of the Map Suite controls such as WPF Desktop Edition, Silverlight Edition, Web Edition, MVC Edition. |} ===Compass=== {|class=“wikitable” cellpadding=“3” !Screenshot !width=78|Sample !width=66|Product !Description |- |250px |View Source<br><br>C# Download<br><br>Need it in another language? |Services <br><br>Applies To: Desktop <br> Web <br> Silverlight <br> Services <br> Wpf <br> |In the project “North Arrow”, you saw how to extend AdornmentLayer to create a North Arrow AdormentLayer. In this project, we expand on that idea and create a more sophisticated class. You will see how you can combine two images to create a compass. Compare to “North Arrow” project, we also added some other handy properties such as a Position property. Also, the compass can be of varied sizes thanks to the SizePercentage property. Finally, if you pass just one image, the compass can behave just like a regular north arrow.<br>We also added new designs of compass in smaller version. See the attached file: Rotating Compass New Smaller Designs.zip |} ===File Geodatabase=== {|class=“wikitable” cellpadding=“3” !Screenshot !width=78|Sample !width=66|Product !Description |- |250px |View Source<br><br>C# Download<br><br>Need it in another language? |Services <br><br>Applies To: Desktop <br> Web <br> Silverlight <br> Services <br> Wpf <br> |This sample demonstrates how you can read data from an ESRI FileGeodatabase in your Map Suite GIS applications. The sample will read data from 3 tables of one FileGeodatabase, and you will find the code as straightforward as consuming any other data source in Map Suite. It works with Map Suite daily development build version 6.0.115.0 or later, and you will need to run the “Setup Unmanaged Dependencies” installer from your daily build package in order for the sample to work The FileGeodatabase sample works in all of the Map Suite controls such as WPF Desktop Edition, Silverlight Edition, Web Edition, MVC Edition and so on. [http://youtu.be/GNpdikbD0nI Video Overview] |} ===Hook Up External Data to Shapefile=== {|class=“wikitable” cellpadding=“3” !Screenshot !width=90|Sample !width=66|Product !Description |- |250px |C# Download<br><br>Need it in another language?

Isolines

{|class=“wikitable” cellpadding=“3” !Screenshot !width=90|Sample !width=66|Product !Description

MapShapes

{|class=“wikitable” cellpadding=“3” !Screenshot !width=78|Sample !width=66|Product !Description

In working with customers using MapShapes for a number of years, we found a common pattern. First, users tried MapShapes by adding one to the screen. This was very simple and got them up and running fast. They next added a few more as they started to build more of their application. After a short amount of time they realized that it was cumbersome to set the projection, styles, zoom levels, etc. on so many MapShapes, especially since the MapShapes often represented the same kind of underlying feature, like a fire hydrant or road block. The problem was that there was no good solution with Map Suite 2.0 to handle lots of very similar dynamic features.<br> In designing Map Suite 3.0, we took this into account and created the InMemoryFeatureLayer and InMemoryFeatureSource. These allowed you to treat all of the same kinds of similar features as if they were one group, which solved many problems. What we later found was that it made it more difficult for the cases where you truly had dozens or hundreds of features that were each unique and you needed to represent them as such. Having not implemented MapShapes, we were caught with a hole in our offering.<br> To fill this gap, we are presenting a project for a simple MapShapeLayer. This is a simple version of a more powerful one that we will include as part of the core framework in the near future. What really struck us when we were creating this new Layer was just how easy it was to do! It is a testament to our 3.0 framework and we decided to include the section below on how we implemented it. Notes from the developer:<br> Success! This was about as easy as I thought it would be. All of the heavy lifting was done by existing classes and all I needed was a little glue code. In retrospect, I would had liked to do this by inheriting from the FeatureLayer and FeatureSource, because then it would have made the layer accessible by spatial queries. In the interests of time, and so I could post this on our forums as fast as possible, I inherited from Layer, which is really simple. You can see that the comments and my notes here take up more room than the code itself!<br> I think you will find this works nearly exactly as the 2.0 MapShapes did. It doesn't support projection; however, I think this could be easily added. We will be creating a production version of this class to include with the framework in the near future, and if projection is indeed easy to add, it will support projection and spatial querying.<br> In a nutshell, what I did was to create a MapShape class that housed a ZoomLevelSet and a single Feature. The ZoomLevelSet has all of the zoom levels, styles, etc. on it, so that part was nice to reuse. I matched this up with a new kind of Layer. I created the MapShapeLayer by inheriting from Layer. The only required overload was Draw, which was nice. I added to the class a MapShape's GeoCollection to store all of your MapShapes. In the Draw I simply looped through the MapShapes, and for each of them I found the zoom level that would be drawing and called its Draw method. In just a few lines of code, it all came together.

Mini Map Adornment Layer

{|class=“wikitable” cellpadding=“3” !Screenshot !width=78|Sample !width=66|Product !Description

Multi Geo Raster Layer

{|class=“wikitable” cellpadding=“3” !Screenshot !width=78|Sample !width=66|Product !Description

This class show how to do that using JPEG images with its associating JGW world file. It speeds up the loading of a large number of Raster layers by loading and drawing on demand only the files in the current extent. It loads a reference file that contains the bounding box, path and file information for all of the Raster files. We load this information into an in-memory spatial index. When the map requests to draw the layer, we find the Rasters that are in the current extent, create a layer on-the-fly, call their Draw method and then close them. In this way, we load on demand only the files that are in the current extent.

Multi Index

{|class=“wikitable” cellpadding=“3” !Screenshot !width=78|Sample !width=66|Product !Description

http://gis.thinkgeo.com/Support/DiscussionForums/tabid/143/aff/21/aft/5921/afv/topic/Default.aspx<br> http://gis.thinkgeo.com/Support/DiscussionForums/tabid/143/aff/21/aft/5958/afv/topic/Default.aspx <br> Consolidating various physical shapefiles into one layer is a flexible and clean way to handle your data. Thanks to multi index, you can treat your layers as one. Depending on your needs you can choose to use all the shapefiles in one folder or only a few. In this project you will see the different ways to use the powerful static function MultipleShapeFileFeatureLayer.BuildIndex()

North Arrow

{|class=“wikitable” cellpadding=“3” !Screenshot !width=78|Sample !width=66|Product !Description

'Rotating the map:'

To rotate the map, you have to be aware that you have to use RotationProjection class provided by MapSuite API. All the layers need to have their projection property set to RotationProjection. Beware that if a Layer does not have that property set, it will not rotate along with the rest of the map.

'Displaying the North Arrow:'

As the map rotate, it is important to keep track of the orientation of the map and to know what the direction to the North is. Inheriting from Adornment Layer, RotatingAdornmentLayer class takes an Image representing a North Arrow and with its RotateAngle property set according to the angle property of RotationProjection, it always shows the North correctly.

Oledb Point FeatureSource

{|class=“wikitable” cellpadding=“3” !Screenshot !width=78|Sample !width=66|Product !Description

In this project, we create the class OledbPointFeatureSource inheriting from FeatureSource and OledbPointFeatureLayer inheriting from FeatureLayer.

Oledb FeatureSource

{|class=“wikitable” cellpadding=“3” !Screenshot !width=78|Sample !width=66|Product !Description

NOTE: For portability and allowing the sample to be self-contained with minimal setup we have used a Microsoft Access database. Due to this there is a limitation there the “Microsoft.Jet.OLEDB” engine can only run in X86 mode. This is reflected in the target for this project. If you use another OLDB source then is limitation is no longer applicable.

Scale Bar

{|class=“wikitable” cellpadding=“3” !Screenshot !width=78|Sample !width=66|Product !Description

SQLInMemoryLayer

{|class=“wikitable” cellpadding=“3” !Screenshot !width=78|Sample !width=66|Product !Description

<br> 'Note:' The approach in this sample works best for small amounts of data (less than 10,000 features) since it loads all of the data into memory. For larger datasets, we recommend using the

SQL2008FeatureLayer

or the <code>OledbFeatureSource</code>, which only reads the data for the given extent you are working in (much more efficient for larger datasets).

Styles with InMemoryFeatureLayer

{|class=“wikitable” cellpadding=“3” !Screenshot !width=78|Sample !width=66|Product !Description

Swine Flu

{|class=“wikitable” cellpadding=“3” !Screenshot !width=78|Sample !width=66|Product !Description

On the web site http://www.mapcruzin.com/free-download-h1n1-swine-flu-arcgis-shapefile.htm, it is possible to download point based shapefiles of swine flu occurrences in the world. While this information is valuable, it is a little difficult to display it at world level. At high zoom levels, all the points are on top of each other making the map very difficult to read and get overall information of the swine flu situation at the world level as you can see in the image with the map of the upper left.<br> Using some the techniques we used before such as Spatial Join with some modification, we can create a new polygon based layer from the country layer adding info from the swine flu layer. That resulting layer can be displayed with the info being a lot more readable as you can see in the map of the lower right corner of the image.<br> We basically use the techniques we saw in the “Spatial Join” project with getting the info from the swine flu layer into the country layer based on spatial relationship. We also use the techniques from “Dissolve with statistics” for doing some statistics on the swine flu records according to what country they belong to. See the comments in the project for more details.<br> Keep in mind that the project is for shapefile data format, if there are people expressing interest for doing the same thing with other data format, we will create a new more generic project.

Watermark Adornment Layer

{|class=“wikitable” cellpadding=“3” !Screenshot !width=78|Sample !width=66|Product !Description

WMTS Layer

{|class=“wikitable” cellpadding=“3” !Screenshot !width=78|Sample !width=66|Product !Description

Zedgraph

{|class=“wikitable” cellpadding=“3” !Screenshot !width=78|Sample !width=66|Product !Description

http://zedgraph.org/wiki/index.php?title=Main_Page<br> With Map Suite, you have the whole ZedGraph API available with an easy interface to add the graphs to the map. For this project, in addition to the MapSuiteCore.dll, you will also need the ZedGraph.dll and ZedGraphStyleExtension.dll references. We will have several projects showing how to integrate other types of charts to your map.

map_suite_services_edition_layers.1442456791.txt.gz · Last modified: 2015/09/17 02:26 by admin