VEMapItem and VEShape uses?

Dec 28, 2010 at 7:13 PM


I've recently started using this library and by experimenting a bit I've managed to find out what most things do. However, I am unclear on a few points:

1. What is the use of VEMapItem? It seems you can declare instances of it in XAML, but it has no special properties, and doesn't seem to be used in any of the samples. Is it something I should/might need to even touch?

2. VEShape class has one concrete implementation (VEPushPin) - is this the only one allowed, or can I derive my own classes to create my own custom shapes/objects to place on a VEMap control?

Thank you.

Jan 13, 2011 at 12:43 AM

1. VEMapItem is the ItemContainer used internally by VEMap. It wraps the VEShapes (including VEPushPins) and allows VEMap to control their placement on the map. You do not need to do anything with this.

2. You can derive your own class from VEShape if you like and add them to the map (or use in the DataTemplate). Depending upon your scenario, it might be more productive to just drive from VEPushPin and override certain methods because VEPushPin contains a lot of useful logic already.