Select a MapPinPoint

5 posts, 0 answers
  1. Sundy
    Sundy avatar
    3 posts
    Member since:
    Jul 2011

    Posted 16 Sep 2011 Link to this post

    I am using MVVM and the ItemSource to bind to a list of locations, do you guys know how I could change the Icon of the Selected PinPoint on the Map ?
  2. Sundy
    Sundy avatar
    3 posts
    Member since:
    Jul 2011

    Posted 19 Sep 2011 Link to this post

    I forgot to mention I am using Information Layer to display the set of PinPoints on the map. I am using a DataTemplate and an ImageSource to display icons on the map, how can I bind event triggers to Hit Test these pinpoint selects ?
  3. DevCraft banner
  4. Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 21 Sep 2011 Link to this post

    Hi Sundy,

    I would recommend you to take a look into our DataBinding demo:
    http://demos.telerik.com/silverlight/#Map/DataBinding

    Greetings,
    Andrey Murzov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  5. Sundy
    Sundy avatar
    3 posts
    Member since:
    Jul 2011

    Posted 28 Sep 2011 Link to this post

    Thanks Andrey I got it working where a CommandBinding for an Event Trigger "MouseLeftButtonDown" returns an Image as it OriginalSource when clicked on my Image. The only problem that I am seeing is I also have a "MapMouseClick" event bound and even though I call a e.Handled = true on the MouseLeftButtonDown it still calls the method that is bound to the MapMouseClick event.

    Thanks,
    Sundy
  6. Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 03 Oct 2011 Link to this post

    Hi Sundy,

    It is very complicated and it is hard to reproduce the problem without your solution or code. But it seems you use the Handled property of the ExecutedRoutedEventArgs instead of the MouseButtonEventArgs. So, the map control also handles the MouseLeftButtonDown event and the MapMouseClick event is triggered.
    I would recommend to attach the MouseLeftButtonDown event handler directly. In this case the event can be cancelled using the Handled property.

    Greetings,
    Andrey Murzov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top
DevCraft banner