ThinkGeo Cloud
ThinkGeo UI Controls
ThinkGeo Open Source
Help and Support
External Resources
ThinkGeo Cloud
ThinkGeo UI Controls
ThinkGeo Open Source
Help and Support
External Resources
The Map Suite World Map Kit WMS Server Deployment Guide will walk you through the process of setting up and publishing your own World Map Kit web map server that covers the entire world, using the default “Key System.” This edition of the Deployment Guide supports World Map Kit WMS Server 7.0.0.0 and higher.
Welcome to Map Suite™ World Map Kit WMS Server from ThinkGeo, a full-featured World Map Kit server that makes it easy for any Microsoft .NET developer to quickly and efficiently set up their own Web Map Service that includes map data covering the entire world – plus enhanced street-level detail of the United States and Canada. Using this WorldMapKit deployment SDK, even developers inexperienced in Geographic Information Systems (GIS) can start serving rich, professional-grade maps in minutes.
The purpose of this guide is to help you quickly get started publishing your own Web Map Service (WMS) that covers the entire world, using the default “Key System”. Like any new software, there is some learning to be done along the way.
How do we start to build up a Map Suite World Map Kit WMS Server with world map data included? The best way is to make a demo with it.
For the purposes of this guide, let's assume we have installed Map Suite World Map Kit WMS Server 7.0 to the default folder: C:\Program Files (x86)\ThinkGeo\Map Suite WorldMapKit Server 7.0.
Please navigate to the default installation directory C:\Program Files (x86)\ThinkGeo\Map Suite WorldMapKit Server 7.0\WorldMapKitServer\WorldMapKitServer, and open “Web.config” as shown in the file list below:
Within “Web.config”, focus on the AppSetting module to change the configuration for the WorldMapKit data directory and the path of the image cache folder. See the screenshot of the relevant lines below:
NOTE: The RequireSignedUrl
module is used to set whether we apply the default “License Strategies” to your map server. If the value is “true”, your map server will support two kinds of users: those with a “Free accout” to get your map images with a watermark embedded in them, and those who have a “Premium account” that lets them request images without a watermark. If the value is “false”, all users can access your map server without any license limits.
Save and close “Web.config”, then open “Control Panel” → “Administrative Tools” → “Internet Information Services (IIS) Manager”. In our example, we are using IIS version 7.5.7600.16385, as you can see in the following screenshot:
Right-click on the “Default Web Site” to open the management menu, and then click the “Add Application…” item. When the “Add Application” dialog appears, configure it as shown in the screenshot below:
NOTE: You can also manage the permissions for the server by right-clicking on “Default Web Site” and choosing “Edit Permission…” and then adding the group or user names that you want to be able to access the server.
Now, all of the settings for your own World Map Kit WMS Server have been configured. Please click the “Browse” link on the right side panel of IIS Manager, and the World Map Kit plugin management page will be shown in your web browser:
Click the “Preview” link to display the map in a temporary window as shown in the screenshot below. This gives you a visual representation of how the maps served by your WMS will look as it is currently configured.
You can also preview the detailed capabilities of your own world map server by clicking the “View Capabilities” link. The capabilities of your server will be displayed as XML in your browser, as seen in the screenshot below. These settings can be changed by modifying the capabilities file “WorldMapKitWmsHandlerCapabilities.xml” that is located in C:\Program Files (x86)\ThinkGeo\Map Suite WorldMapKit Server 7.0\WorldMapKitServer\WorldMapKitServer\CapabilitiesXml.
To change the default watermark on each map tile, please navigate the installation folder C:\Program Files (x86)\ThinkGeo\Map Suite WorldMapKit Server 7.0\WorldMapKitServer\WorldMapKitServer\Images and find the image “watermark.png”. See the figure below:
Replace this file with the image of your choice, making sure that the new image still has the same name “watermark.png”. Here is the image we used for this example:
Now, in order to see your new watermark, you need to restart the website. This is because we cache the watermark image in the application for maximum performance.
Browe the “WorldMapKitServer” application again and display the the preview page to see the watermark on your maps.
Once your World Map Kit WMS Server is set up, two kinds of license strategies, “Free” and “Premium”, will take effect. In other words, there are two ways you can serve maps to your users. One way is for free users who aren't required to have any license information, in which case you include a watermark on your map images. The other way is for premium users, in which there are no watermarks on the maps. The Free version is very easy to understand, but the Premium version is a little complex, so let's clarify it now.
The first thing to understand is that the Premium license strategy uses a “key system” to control access to your map server. Premium users will connect to your server using a special key that identifies their access type as Premium.
(^\s*)(http|https)\://[[a-zA-Z0-9\-]]*[\.]*(thinkgeo)[[\.\w]]+[/\w\.]+/?([[a-zA-Z0-9\:\-\._\?\,\'/\\\+&%\$#\=~]])*[[^\.\,\)\(\s]]\s*$
The following URLs are then covered:
All of the license information is stored in two .txt files. The first file, “Domain.txt”, is for domain information registered by web users. The other file, “UserClients.txt”, is for the “Client Ids” and “Private Keys” that are used by Desktop users. These files are located in C:\Program Files (x86)\ThinkGeo\Map Suite WorldMapKit Server 7.0\WorldMapKitServer\WorldMapKitServer\App_Data.
NOTE: Both of these .txt files are cached for 30 minutes by default (a duration that you can change in the “Web.config” file). This means that when you make changes to these files, you need to restart your map server for the changes to take effect immediately. Otherwise, your users will have to wait untill the cache has expired for their new credentials to become active.
You have now explored the basics of using Map Suite World Map Kit WMS Server on your own server! If you have further questions about using the product, please visit the Map Suite World Map Kit support forum or one of the following support channels:
This guide will help you learn how to consume your own World Map Kit WMS Server that you deployed by following the World Map Kit WMS Server Deployment Guide. In this guide, you will find four examples of how to consume your World Map Kit server: from a web application, a desktop application, a Silverlight application and a WPF application. This edition of the Deployment Guide supports World Map Kit WMS Server 6.0.0.0 and higher.
Welcome to Map Suite™ World Map Kit WMS Server from ThinkGeo, a full-featured World Map Kit server that makes it easy for any Microsoft .NET developer to quickly and efficiently set up their own Web Map Service that includes map data covering the entire world – plus enhanced street-level detail of the United States and Canada. Using this WorldMapKit deployment SDK, even developers inexperienced in Geographic Information Systems (GIS) can start serving rich, professional-grade maps in minutes.
This guide will help you learn how to consume your own World Map Kit WMS Server that you deployed by following the Map Suite World Map Kit WMS Server Deployment Guide. In this guide, you will find four examples of how to consume your World Map Kit server: from a web application, a desktop application, a Silverlight application and a WPF application. Like any new software, there is some learning to be done along the way.
(For the purpose of this guide, let's assume we have deployed your World Map Kit WMS Server to Microsoft IIS (Internet Information Services) on your own server machine. For example, http://localhost/WorldMapKitServer/WmsServer.axd will be used in this guide.)
Download four sample applications to learn how to connect to your World Map Kit WMS Server using Map Suite Desktop Edition, Web Edition, Silverlight Edition and WPF Desktop Edition.
Quick Index:
For the purposes of this example, we'll use a desktop application made with Map Suite Desktop Edition to access your server. Because you may wish to monetize access to your map server, we have provided two different snippets of example code below. The first example accesses your map server with a “free” account that requires no login information. (For free or unauthenticated users, you may wish to serve maps with a watermark embedded, such as your company logo.) The second example shows how to access your map server using a premium account that requires a client ID and a private key to login.
Example 1: Access the World Map Server with a Free Account
Here is an example showing how to access your world map server with Map Suite Desktop Edition using a “free” or unauthenticated connection.
public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { winformsMap1.BackgroundOverlay.BackgroundBrush = new GeoSolidBrush(GeoColor.GeographicColors.ShallowOcean); winformsMap1.MapUnit = GeographyUnit.DecimalDegree; winformsMap1.CurrentExtent = new RectangleShape(-126, 57, -70, 18); // You can access to the World Map Kit Server for free, but with watermark on every tile image TiledWmsLayer tiledWmsLayer = new TiledWmsLayer(new Uri("http://localhost/WorldMapKitServer/WmsServer.axd")); // You need to specify the name and style of Layer you want to consume tiledWmsLayer.ActiveLayerNames.Add("WorldMapKitLayer"); tiledWmsLayer.ActiveStyleNames.Add("WorldMapKitDefaultStyle"); LayerOverlay staticOverlay = new LayerOverlay(); staticOverlay.Layers.Add("WorldMapKitServer", tiledWmsLayer); winformsMap1.Overlays.Add(staticOverlay); winformsMap1.Refresh(); } }
Example 2: Access the World Map Server with a Premium Account
Here is an example showing how to access your world map server with Map Suite Desktop Edition, using a premium account. This requires that we pass in a client ID and a private key as shown.
public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { winformsMap1.BackgroundOverlay.BackgroundBrush = new GeoSolidBrush(GeoColor.GeographicColors.ShallowOcean); winformsMap1.MapUnit = GeographyUnit.DecimalDegree; winformsMap1.CurrentExtent = new RectangleShape(-126, 57, -70, 18); // You can access to the World Map Kit Server for free, but with watermark on every tile image TiledWmsLayer tiledWmsLayer = new TiledWmsLayer(new Uri("http://localhost/WorldMapKitServer/WmsServer.axd")); // Also you can access to the World Map Kit Server with billable account, // otherwise you will get watermark on every tile image tiledWmsLayer.ClientId = "YourClientId"; tiledWmsLayer.PrivateKey = "YourPrivateKey"; // You need to specify the name and style of Layer you want to consume tiledWmsLayer.ActiveLayerNames.Add("WorldMapKitLayer"); tiledWmsLayer.ActiveStyleNames.Add("WorldMapKitDefaultStyle"); LayerOverlay staticOverlay = new LayerOverlay(); staticOverlay.Layers.Add("WorldMapKitServer", tiledWmsLayer); winformsMap1.Overlays.Add(staticOverlay); winformsMap1.Refresh(); } }
This section shows how you can use a WPF application created using Map Suite WPF Desktop Edition to access your own map server.
Example 1: Access the World Map Server with a Free Account
Here is an example showing how to access your world map server with Map Suite WPF Desktop Edition using a “free” or unauthenticated connection.
public partial class Window1 : Window { public Window1() { InitializeComponent(); } private void Grid_Loaded(object sender, RoutedEventArgs e) { map1.MapUnit = GeographyUnit.DecimalDegree; map1.CurrentExtent = new RectangleShape(-126, 57, -70, 18); // You can access to the World Map Kit Server for free, but with watermark on every tile image TiledWmsLayer tiledWmsLayer = new TiledWmsLayer(new Uri("http://localhost/WorldMapKitServer/WmsServer.axd")); // You need to specify the name and style of Layer you want to consume tiledWmsLayer.ActiveLayerNames.Add("WorldMapKitLayer"); tiledWmsLayer.ActiveStyleNames.Add("WorldMapKitDefaultStyle"); LayerOverlay staticOverlay = new LayerOverlay(); staticOverlay.Layers.Add("WorldMapKitServer", tiledWmsLayer); map1.Overlays.Add(staticOverlay); } }
Example 2: Access the World Map Server with a Premium Account
Here is an example showing how to access your world map server with Map Suite WPF Desktop Edition, using a premium account. This requires that we pass in a client ID and a private key as shown.
public partial class Window1 : Window { public Window1() { InitializeComponent(); } private void Grid_Loaded(object sender, RoutedEventArgs e) { map1.MapUnit = GeographyUnit.DecimalDegree; map1.CurrentExtent = new RectangleShape(-126, 57, -70, 18); // You can access to the World Map Kit Server for free, but with watermark on every tile image TiledWmsLayer tiledWmsLayer = new TiledWmsLayer(new Uri("http://localhost/WorldMapKitServer/WmsServer.axd")); // Also you can access to the World Map Kit Server with billable account, // otherwise you will get watermark on every tile image tiledWmsLayer.ClientId = "YourClientId"; tiledWmsLayer.PrivateKey = "YOurPrivateKey"; // You need to specify the name and style of Layer you want to consume tiledWmsLayer.ActiveLayerNames.Add("WorldMapKitLayer"); tiledWmsLayer.ActiveStyleNames.Add("WorldMapKitDefaultStyle"); LayerOverlay staticOverlay = new LayerOverlay(); staticOverlay.Layers.Add("WorldMapKitServer", tiledWmsLayer); map1.Overlays.Add(staticOverlay); } }
A web-based application made with Map Suite Web Edition can also be used to access your world map server. Let's have a look at the code below to see how it works.
public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { Map1.MapBackground.BackgroundBrush = new GeoSolidBrush(GeoColor.FromHtml("#E5E3DF")); Map1.MapUnit = GeographyUnit.DecimalDegree; Map1.CurrentExtent = new RectangleShape(-126, 57, -70, 18); // You need to specify WorldMapKitServer URI and the name and style of Layer you want to consume WmsOverlay wmsOverlay = new WmsOverlay("WorldMapKitServer", new Uri("http://localhost/WorldMapKitServer/WmsServer.axd")); wmsOverlay.Parameters.Add("LAYERS", "WorldMapKitLayer"); wmsOverlay.Parameters.Add("STYLES", "WorldMapKitDefaultStyle"); Map1.CustomOverlays.Add(wmsOverlay); } } }
Now let's have look at how to access your world map server from a Silverlight application, such as one you could build with Map Suite Silverlight Edition. Here is the sample code that makes it work.
Client-Side Code:
public partial class MainPage : UserControl { public MainPage() { InitializeComponent(); } private void LayoutRoot_Loaded(object sender, RoutedEventArgs e) { Map1.MapUnit = GeographyUnit.DecimalDegree; Map1.CurrentExtent = new RectangleShape(-135.7, 83.6, 113.5, -53); ServerLayerOverlay serverLayerOverlay = new ServerLayerOverlay("NativeServer", "SilverlightMapConnector1"); Map1.Overlays.Add(serverLayerOverlay); Map1.Refresh(); } }
Example 1: Access the World Map Server with a Free Account
This example shows how to access your world map server with Map Suite Silverlight Edition using a “free” or unauthenticated connection.
public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { TiledWmsLayer tiledWmsLayer = new TiledWmsLayer(new Uri("http://localhost/WorldMapKitServer/WmsServer.axd")); // You need to specify the name and style of Layer you want to consume tiledWmsLayer.ActiveLayerNames.Add("WorldMapKitLayer"); tiledWmsLayer.ActiveStyleNames.Add("WorldMapKitDefaultStyle"); ServerLayerOverlay layerOverlay = new ServerLayerOverlay("NativeServer"); layerOverlay.Layers.Add(tiledWmsLayer); SilverlightMapConnector1.ServerLayerOverlays.Add(layerOverlay); } } }
Example 2: Access the World Map Server with a Premium Account
This example shows how to access your world map server with Map Suite Silverlight Edition, using a premium account. This requires that we pass in a client ID and a private key as shown.
public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { TiledWmsLayer tiledWmsLayer = new TiledWmsLayer(new Uri("http://localhost/WorldMapKitServer/WmsServer.axd")); // Also you can access to the World Map Kit Server with billable account, // otherwise you will get watermark on every tile image tiledWmsLayer.ClientId = "YourClientId"; tiledWmsLayer.PrivateKey = "YOurPrivateKey"; // You need to specify the name and style of Layer you want to consume tiledWmsLayer.ActiveLayerNames.Add("WorldMapKitLayer"); tiledWmsLayer.ActiveStyleNames.Add("WorldMapKitDefaultStyle"); ServerLayerOverlay layerOverlay = new ServerLayerOverlay("NativeServer"); layerOverlay.Layers.Add(tiledWmsLayer); SilverlightMapConnector1.ServerLayerOverlays.Add(layerOverlay); } } }
You have now learned the basics about how to consume a World Map Kit WMS Server that you deployed by following the Map Suite World Map Kit WMS Server Deployment Guide. If you have further questions about using your World Map Kit WMS Server, please visit the Map Suite World Map Kit support forum or use one of the following support channels:
Download four sample applications to learn how to connect to your World Map Kit WMS Server using Map Suite Desktop Edition, Web Edition, Silverlight Edition and WPF Desktop Edition.