SuperGIS Server API for Silverlight
SuperGIS Server 3.1 provides abundant API samples to demonstrate how to customize SuperGIS Server websites. Each sample offers the live sample site and codes for you to download and apply to your own website.

Here are essential principles for developers to know before starting customizing the website.
Principles for SuperGIS Server Silverlight Developers
SuperGIS Server Silverlight API gives you the functions of GIS, such as map browsing, analysis and query in Microsoft Silverlight platform. Here are some tips for you to develop your application with SuperGIS Server Silverlight API.
1. Read the help document before you start
Before you start to develop Silverlight application, it is recommended you to read the SuperGIS Server help document in
"C:\Program Files (x86)\SuperGeo\Server\Help\Developer_Guide_ENU.chm"
It teaches you where to add the references and set up the minimum develop environment. The basic set up instruction is not included here.
2. Create Ultra Website
In Silverlight API, every map, or layer comes from ultra website. You can check the resource file: Agent.aspx. It is created after you create the ultra website. If your Silverlight application is running in internet or publish in WWW, your have to give the resource path as accessible url, like this:

pLayer.ResourcePath = "http://sgs.supergeo.com.tw/ptMvInfo/Agent.aspx";
3. Query Settings
You have to activate the "Feature Services" for the "Map Service" if you want to implement the query function.
In "SuperGIS Server Manager" > "Publish my map or other GIS Services" > Select one map service in "Published Services" > "config.." > Click "Editing" > check on "Use Feature Service" > check on the layer you want to query in "Editable Layers".
Just check the attribute table of the publish layer has "GID" and "Edition" fields or not. It helps you to confirm the layer is ready to be queried or not.
4. Server Side Code
In thIn this sample web site, you can copy the sample code in "Code" section. But remember, some of the samples are required to modify both in "Client Side"(XAML") and "Server Side"(ex: SGSAgent.cs in ".\App_Code\"). When you use the "Code" content, do not forget to put the code in the correct location.
5. Modify the Name Space
For the Silverlight api beginners, if you just copy and past everything in your application, it often happens to unknown error in unknown situation. For example, your project name is "project1", but the name space of the sample code( "XAML" and "XAML.CS") is not "project1", you need to change them to meet your program. See this screen shot, don't forget to change the sample code name space as your own name space.



Click a map to find out the deClick a map to find out the details of the methods to customize the website.
Buffer Query Map Tip
Point Query Query and Locate
Query by Graphics Toolbar