开发者

Help for writing a click event for a custom map

I have an image of the political map of the USA. I want 开发者_如何学Cto write separate click events for each of the 50 states in Visual Studio. How would I do that?


If a static HTML map is what you want, then use an ImageMap control

In winforms that may be a little more work than you want to do.

There are no 'shape' controls so you would have to define a virtual map and just monitor click events.

Your best bet is to use WPF or Silverlight. That would be a piece of cake. polys in WPF are first class citizens and have events. It will look real purty too.

And I am sure there are already defined maps xaml on the google. (map, article)


Suggest you get your hands on something like Macromedia Fireworks which allow you to create image maps.

This article explains how to do it using photoshop.

http://www.createblog.com/photoshop-tutorials/736-photoshop-image-maps/

Or even online web site

http://www.image-maps.com

Or even this

http://en.wikipedia.org/wiki/Template:USA_imagemap_with_state_names

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜