Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6044623
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:01:57+00:00 2026-05-23T07:01:57+00:00

I want to animate a car dot on a Bing map. I can easily

  • 0

I want to animate a “car” dot on a Bing map. I can easily draw multiple dots as the item travels around, but I want to have a single dot move around per car.

XAML

    <m:Map Name="myMap" Grid.Row="2" MouseClick="myMap_MouseClick" UseInertia="True">
    <m:MapLayer x:Name="carLayer" />
    </m:Map>

Some code:

private void AddCarDot(double latitude, double longitude)
{
    Ellipse point = new Ellipse();
    point.Width = 15;
    point.Height = 15;
    point.Fill = new SolidColorBrush(Colors.Blue);
    point.Opacity = 0.65;
    Location location = new Location(latitude, longitude);
    MapLayer.SetPosition(point, location);
    MapLayer.SetPositionOrigin(point, PositionOrigin.Center);

    carLayer.Children.Add(point);
}

private void cmbCar_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if(cmbCar.SelectedItem != null)
            {
                Binding binding = new Binding("CarLocation");
                binding.Source = cmbCar.SelectedItem;
                binding.Mode = BindingMode.OneWay;
                carLayer.SetBinding(MapLayer.PositionProperty, binding);
            }
        }

The CarLocation is a property on the Car object of type Location.
However that does not work and I’m not quite sure how to get the “car” to move around the map. Can someone point me in the right direction?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T07:01:58+00:00Added an answer on May 23, 2026 at 7:01 am

    Well you’re question kind gets cloudly when a mysterious “taxiLayer” appears positively gets muddy when you want set a binding on it instead of the “point” (which I guess represents a car).

    What needs to happen is you are using the MapLayer.Position dependency property as an attached property. When the UIElement to which this is attached is a child of a MapLayer map layer knows how to layout it.

    So the question is how would assign a binding to this property so that when the value of the bound object changes the position is updated. I’m going to make an assumption the Elipse created in the earlier part of the code is available as field I’ll call car. Then the code might look something like this:-

    private Elipse AddCarDot(object source)
    {
        Ellipse point = new Ellipse();
        point.Width = 15;
        point.Height = 15;
        point.Fill = new SolidColorBrush(Colors.Blue);
        point.Opacity = 0.65;
        MapLayer.SetPositionOrigin(point, PositionOrigin.Center);
        point.SetBinding(MapLayer.PositionProperty, new Binding("CarLocation") {Source = source});
        carLayer.Children.Add(point);
    }
    
    private void cmbCar_SelectionChanged(object sender, SelectionChangedEventArgs e)
    {
        if(cmbCar.SelectedItem != null)
        {
            AddCarDot(cmbCar);
        }
    }
    

    Now assuming you object that has a CarLocation property implement INotifyPropertyChanged so the binding can be alerted when CarLocation changes the dot will move appropriately.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to animate some ellipses with a SplinePointAnimationWithKeyframes, but I can't figure out
i want to use .animate function but i have some problems i want to
I want to animate the scaling down of a UIView, but not about its
I am trying to animate an object, let's say its a car. I want
I want to animate the background, but it won't change with .animate! <script src=https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js></script>
I want to animate some multiple objects sequentially. As in, one animation should happen
I want to animate insert\delete the item in a StackPanel. Eg: If new item
i want to animate my scrollLeft = value using XUI (note that I can't
I want to animate the position of a UISearchBar, but there's no animate effect
I want to animate movement of a selection box in ListView so it will

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.