Get coordinates from click

3 posts, 0 answers
  1. Nicolas
    Nicolas avatar
    4 posts
    Member since:
    Dec 2008

    Posted 29 Aug Link to this post

    Hi,

    How can i get WGS84 coordinates from radmap click event?

    Regards,

  2. Nicolas
    Nicolas avatar
    4 posts
    Member since:
    Dec 2008

    Posted 29 Aug in reply to Nicolas Link to this post

    Problem solved :

    Point p = this.radMap1.MapElement.PointFromScreen(new Point(e.X, e.Y));
                PointL pl = new PointL(p.X + this.radMap1.MapElement.ViewportInPixels.Location.X, p.Y +this.radMap1.MapElement.ViewportInPixels.Location.Y);
                PointG location = MapTileSystemHelper.PixelXYToLatLong(pl.X, pl.Y,this.radMap1.MapElement.ZoomLevel);
                pin.Location = new PointG(location.Latitude, location.Longitude);

  3. Hristo
    Admin
    Hristo avatar
    1018 posts

    Posted 29 Aug Link to this post

    Hello Nicolas,

    Thank you for writing.

    Indeed that is the correct approach for obtaining the coordinates when clicking on the map.

    Please let me know if you have other questions.

    Regards,
    Hristo
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top