Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Looking for a simple Silverlight map component

Tags:

silverlight

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!

like image 517
brian chandley Avatar asked Feb 12 '26 07:02

brian chandley


2 Answers

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 for the one polygon styled below):

enter image description here

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.

Update:

And if you get yourself a graphic tablet and pen this sort of point-to-point work is about 5 times faster than with a mouse!

like image 90
Gone Coding Avatar answered Feb 15 '26 10:02

Gone Coding


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.

like image 39
thomasmartinsen Avatar answered Feb 15 '26 10:02

thomasmartinsen



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!