1.  
    Hi,

    I have the following XAML code to display a map:
    <GeoBase:MapControl Grid.Column="0" x:Name="MainMap"
    Center="{Binding MapCenter}"
    Zoom="{Binding MapZoomLevel}"
    Heading="{Binding MapHeading}"
    ZoomEnable="False"
    PanEnable="True"
    Perspective="TwoD"
    DragBehavior="Hand">
    <ContentControl x:Name="VehicleMarker"
    Width="50" Height="50"
    Template="{StaticResource VehicleMarkerStyle}"
    GeoBase:MapControl.Location="{Binding MapCenter}">
    </ContentControl>

    </GeoBase:MapControl>

    This works fine to center the map on the vehicle using the MapCenter binding. I.e. when the MapCenter property on the view model changes, the map will change to reflect the new MapCenter property.

    However, if I pan the map by dragging, it will not center on the MapCenter position anymore. I do not understand why this is, nor what I can do to remedy the situation. It's as if the control goes into another state from which I can't recover. The other bindings seem to work (heading and zoom).

    When I change the MapCenter position, I expect the map to be redrawn such that the MapCenter is in the middle of the map window. And that seems to be what is happening until I pan the map for the first time. After I pan the map, it will redraw the vehicle marker correctly, but it will not center the map / vehicle in the center of the window.

    Please help me resolve this.

    Thanks!
    • CommentAuthorLaszloMako
    • CommentTimeJan 10th 2017
     
    Hi Dan,

    I've got the email you sent to gbsupport@telogis.com with both this question and another one included. I will reply there so we can continue more easily if you have any follow-up questions. Stay tuned ;)

    Thanks,
    Laszlo
    • CommentAuthorclever_dan
    • CommentTimeJan 10th 2017
     
    Thanks for the reply. I have still not been able to sort this out, so I am eagerly awaiting comments from Telogis.