tags:

views:

65

answers:

3

I am looking for a light-weight map component that displays a map of the US and allows users to click on a State and see information pertaining to that state. The data I want to display is in my database. I just need to know what state was selected so I can display the detail. This is something I am doing to get familiar with Silverlight.

All the searches for Silverlight/ Maps I have done so far have pointed me at solutions that are far more complicated than I need. My perception is that using Bing Maps to do this simple task would a waste of the features provide by Bing.

Anyone know of such a Component? Am I wrong that Bing Maps is not the right tool for the job?

TIA!

Update: In case anyone wants a similar setup and does not care to spend a lot of time creating paths - Here is the map I made: http://ratherbecoding.net/Silverlight/SimpleMapp

If you want the XAML/code behind & images take em: http://ratherbecoding.net/Silverlight/SimpleMapp/MapFiles.zip disclaimer: I take no responsibility for my poor Silverlight/Geographical knowledge and spelling skills.

+1  A: 

The interaction with Bing Maps in Silverlight is really strong and provide you with easy communication between the map and your data. I would give Bing Maps a try.

xamlgeek
+2  A: 

If you have access to Expression Studio (specifically Expression Design), creating maps as vector based images is quite easy. Poly-paths in Xaml are also relatively efficient to store and serve up compared to images.

You import a map as a background image and use the pen tool to dot-to-dot trace around the country. Combine all those path segments into a single path. Then create a separate poly-path for each state (close them to allow for a fill).

It will take a few hours to build all this (I know having done this for a world map country selector... took 4-5 hours solid).

By having each state represented by a filled polygon-path highlighting (by changing the fill colour) is trivial on mouse-enter/mouse-leave events.

If you want stylistic map, remove the image, otherwise use transparency on the state polygons to show the map through the roll-overs.

Enough already
I do not have Blend right now. This is a nice feature. I have been thinking that Blend is a must for Silverlight more and more.
brian chandley
+1 A pragmatic solution that doesn't involve a the heavy super-dooper Bing map control just to provide a State chooser.
AnthonyWJones
@brian chandley: I'm a pure coder through and through (not a designer by any means) but I cannot recommend the Expression tools strongly enough. You can't do complicated GUIs in VS 2010 as easily as Expression Blend and Sketch flow has allowed me to *knock the socks off* clients. Any one of the tools will pay for the package quite quickly if you develop for a living.
Enough already
Thanks. Working a Blend evaluation version for now. As my intention is to take SL for a spin, this approach will take me further. I'll leave Bing Maps for another day!
brian chandley