I can put a pushpin in the center of each Polygon to achieve a "clickable" region but that is an extra step I'd rather not take.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Yes, but it's kind of a pain. The steps are:
1.) attach to the mousclick event within VEMap 2.) determine if the mouseclick was within the area of your polygon or on a shape 3.) stop event propogation to the map object itself
The mousehandler portion here: http://www.codeproject.com/KB/scripting/Use_of_VEMap.aspx#heading0012 is a decent primer, though if you need specific code I can work that up for you as well.
As a note, you stop the bubbling of the event by returning true within your own funciton: http://msdn.microsoft.com/en-us/library/bb412543.aspx