Just another WordPress.com site

IDV Silverlight Demo II…Draw Tools!



It’s out!  Check out the new draw features in the IDV Solutions Silverlight Demo.  We’ve been working on some fun new draw tools in an effort to learn about Silverlight.  We are excited about the direction Silverlight is taking and the increased controls offered in Blend.  This demo is using the latest build of Silverlight, Silverlight 2.0 Beta 2.  Make sure you have the right player (you can install it here)

So we have the same fun navigation scheme as before, where you can zoom and spin and fling the earth the way you always wanted.  But now you can draw and export your map drawings to other map applications.  Anyways, here are some descriptions of the draw tools…


The Draw Panel along the right of the screen lets you turn the drawing feature on or off, select the type of feature to draw, and ultimately export the drawing as a KML file.Expanding the carrot next to each of the three geometry types expands a sidewalk that holds some visual variables, in this case color.  But someday each square of the sidewalk will hold a category of visual variable, like color, size, transparency…and that square of the sidewalk can expand as well.
If you want to change the color of something after you have drawn it, then select it and open the color sidewalk and choose something else.

To delete any item that you’ve drawn, select it to show its data window and select "erase."  When erased, points erupt into a cloud of destruction.  Lines and polygons just disappear into the ether.  Forever.  If you want to delete individual tics along a line or area, select it then click the delete key.  Above, I am obliterating a point feature that I had dropped in the Alleghenies.


Drop points all over the map.  When you add a point, a window appears asking for some descriptive information.  Fill it in -or don’t.  Clicking and holding an existing point picks it up for re-positioning.  If the pushpin did not lift up when it was time to move, then large canyons would be gouged throughout the world.  Above, I am moving a point symbol onto home plate at Comerica Park.



Here I am tracing the land area of Martha’s Vineyard and delineating the DMZ between North and South Korea.  I double-clicked to stop drawing a feature, then I filled in the info box associated with each feature.



When drawing lines and areas, click a path on the map to trace out your line in the map by clicking to drop a tic (or bend in the line).  Double-click to stop drawing the line or area.  Between each tic is a ghost tic option, if you want to add more detail to the line or area.  By drawing from general to specific, you can rough in an area then zoom in and activate those ghost tics for loads of detail.  Here, I roughed out South America, then positioned my ghost tics to add more and more details.  Then I zoomed in and added even more detail.  It is addictive.


At any point I can save my drawing as a KML file.  Above, I have generated the shape of Michigan that I drew as a KML file and loaded it into Virtual Earth Live Maps.

Now you can export your drawings as an SQL Server 2008-ready spatial script!!  Get ready to live.

So again, here is the URL to the demo: http://silverlight.idvsolutions.com/
and here is the URL to the latest Silverlight player: http://www.microsoft.com/silverlight/resources/install.aspx?v=2.0


John Nelson / IDV Solutions / john.nelson@idvsolutions.com


44 responses

  1. Andries

    Very nice demo! Just love the navigation controls ! Any chance of sharing the source code?

    June 24, 2008 at 3:00 am

  2. Matt

    Fantastic implementation – hours of fun
    Is there a way to measure a line (or set of lines) on a map?

    June 24, 2008 at 3:07 pm

  3. audit

    any chance of this replacing live maps it has that edge live maps lacks

    June 28, 2008 at 1:39 pm

  4. John M. Nelson

    Source code? Replacing the VE control?No and No.  But thanks!  This is a demo and not a product (yet) -so copies aren\’t available (but use it here all you want).  What\’s next?? KML Wiki!.As for the VE control, check out Chris Pendleton\’s interesting blog post that stirred the pot a bit…http://blogs.msdn.com/virtualearth/archive/2008/06/18/lots-of-virtual-earth-and-silverlight-development-outside-of-microsoft.aspx

    July 1, 2008 at 9:42 pm

  5. Unknown

    Hi, do you know why in Opera, sometimes demo does not load on first try? After refreshing (sometimes even have to do it few times) it loads fine.When it does not work, it just shows images in top left corner. Before I think I was able to open some stacktrace upon clicking them but now it does not seem to behave like that.

    July 14, 2008 at 4:02 pm

  6. Austin

    oh,the silverlight application is so cool,I like to study it.

    July 22, 2008 at 12:20 am

  7. Unknown

    What are the processes of uploading a KML file or ESRI Shapefile data layer?

    July 26, 2008 at 7:43 am

  8. John M. Nelson

    There is no support for importing external files.  This demo is a blank canvas where you draw stuff in session.  Soon there will be a public release with a Wiki upgrade so you can save and edit your drawings and those of others.  But allowing users to pull in the ESRI proprietary shapefile format would be an excellent feature.

    August 1, 2008 at 4:51 pm

  9. David

    My only dissapointment was when I started to use the data within SQL 2008, all the references are relative to the display coordinates.
    What would make this really useful is if you could pass back valid GPS (Lat,Long) data.

    September 12, 2008 at 3:25 am

  10. Andy

    So do you have any pointers for someone wanting to get started on doing something like this? Where can one go to know how you have placed a point on the map and it stays there when you move the map around? I have been wanting to do something more advanced like this for my church where we have an emergency plan for our area, we live in FL and hurricanes are sometimes a problem. I am really looking to have points for each of the membership, but need a way to create a movable flag especially since the mapping systems are not 100% correct where homes are located.
    Very nice work.

    September 14, 2008 at 4:58 pm

  11. Erik

    Very cool … helps me create custom KML in no time … thx…

    December 11, 2008 at 9:33 am

  12. Unknown


    July 14, 2009 at 11:32 pm

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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