Vishful thinking…

Loading Shapefiles into the ESRI Silverlight map without uploading to the server

Posted in Uncategorized by viswaug on May 24, 2009

I have been working with Silverlight and in particular the ESRI Silverlight API recently and have been having a lot of fun with it. It is a refreshing change from working with the HTML/CSS/JS combo, even though I do miss the the simplicity and power of HTML/CSS/JS a lot of times. Silverlight brings with it a lot of capabilities that wasn’t possible with JavaScript. These capabilities in Silverlight can help simplify some of the workflows and increase the usability of some of the features needed in a lot of the web-based mapping applications. Like for example, one of the common requirements is for users to be able to view Shapefiles on their machines on the web maps.

With the JavaScript APIs, the only way this could be achieved was to upload the Shapefiles to the web server and then render the shapefiles either as images on the server that are sent down to the browser or as SVG/VML in the browser. Well, this is where the power of Silverlight helps us simplify things by allowing us to open and read the shapefiles in the Silverlight plug-in of the browser itself. This eliminates the need for uploading the shapefiles to the server and thus simplify the workflow involved.

There are a lot more things that the Silverlight plug-in is capable of that a lot of web-mapping applications can use. The ESRI Silverlight API packs a lot of punch but there are still a lot more holes to be filled. So, to help fill those holes, I have started an open-source project on CodePlex where I have uploaded some of the useful things that I have been working on. Please find the link to the project below.

ESRI Silverlight API Contrib

The project currently contains the following features.

1) A custom GeoRSS layer type that can be added to the ESRI Silverlight API map.

2) An custom map layer where the image is created dynamically in the browser itself. The current layer regenerates the image for the layer multiples times a second to simulate ripples on the map.

3) Utility classes that will help users load shapefiles from their computer directly on to the Silverlight API map without uploading the shapefile to the server


Please download and use the project as you see fit. Even better, you can sign-up as a contributor and help grow the project and the codebase. I also welcome any and all inputs on other ideas for new features that you might want to see added or critiques of the current codebase.

4 Responses

Subscribe to comments with RSS.

  1. chakresh said, on June 25, 2009 at 6:54 am

    hi dear
    when i m tring to run given source code it gives error
    invalid uri scheme’file://’ for map control control must be hosted in a http(s) website

    • Mehran said, on August 15, 2011 at 6:06 pm

      If You run the project right from the Visual Studio IDE, By default VS shows the name of start up project using Bold style. Make sure the web project is your Start up project. you can do this simply by right clicking on the name of the project and choosing “Set as start up Project”.

      Hope to be useful.

  2. ViralPatel said, on August 25, 2011 at 4:58 am

    hiii Dear,

    i can’t find any demo for shape file call in silverlight. So please help me.
    and in one code i cant find reference of Shapefile class.

  3. GaryWhitcher said, on December 6, 2012 at 3:17 pm

    Can this be done in reverse? I have been successful at loading a shapefile, but I want to export graphics to a shapefile that can then be loaded into ArcMap.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: