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

  • SEARCH
  • Home
  • 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 8933973
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T09:40:36+00:00 2026-06-15T09:40:36+00:00

I am using the windows phone emulator. I wrote a very simple program: draw

  • 0

I am using the windows phone emulator. I wrote a very simple program: draw a marker on the map when the user tap the map once.

Then I used map_tap event, and get the tapped location as follows,

private void map_Tap(object sender, System.Windows.Input.GestureEventArgs e)
{
    Point p = e.GetPosition(null);
    GeoCoordinate s = map.ConvertViewportPointToGeoCoordinate(p);

    Ellipse myCircle = new Ellipse();
    myCircle.Fill = new SolidColorBrush(Colors.Blue);
    myCircle.Height = 20;
    myCircle.Width = 20;
    myCircle.Opacity = 50;

    MapOverlay myLocationOverlay = new MapOverlay();
    myLocationOverlay.Content = myCircle;
    myLocationOverlay.PositionOrigin = new Point(0, 0);
    myLocationOverlay.GeoCoordinate = s;

    MapLayer myLocationLayer = new MapLayer();
    myLocationLayer.Add(myLocationOverlay);

    map.Layers.Add(myLocationLayer);
}

The problem is that, the point I get is not the point where the mouse (in the emulator it is a mouse but not a finger) clicked. It is some distance lower (about 50 pixels lower) than where I clicked.

So wherever I click in the emulator, the circle is drawn below where I clicked, it’s some kind of weird.

Is there anything wrong with my code?

Thank you very much.

  • 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-06-15T09:40:39+00:00Added an answer on June 15, 2026 at 9:40 am

    The GestureEventArgs.GetPosition() method takes a parameter specifying what UIElement to get the coordinate relative to (see the MSDN documentation). So, try doing

    Point p = e.GetPosition(map);
    

    instead.

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

Sidebar

Related Questions

I'm making a simple game using the Windows Phone Silverlight and XNA Application type
When I first started using the Windows Phone 7 emulator with Visual Studio everything
I've been using SQLite for Windows Phone ( http://wp7sqlite.codeplex.com/ ) trying to do a
Using this tutorial: http://www.c-sharpcorner.com/uploadfile/UrmimalaPal/creating-a-windows-phone-7-application-consuming-data-using-a-wcf-service/ I have created sample/hello world application on the windows phone
I'm using Visual Studio 2012 for Windows Phone 7 and this is my first
I'm using PhoneGap to develop a Windows Phone 7 app. I'm trying to call
I am using the adRotator control with my Windows Phone 7 app. They have
I'm thinking of developing a Windows Phone 7 application using PhoneGap and have a
while programming for windows phone 7, I created a listbox and using DataTemplate which
I am using the Glyphs class to display text in a Windows Phone 7

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.