Topic: getting GPS from screen position

Hi Alex,
noticed your code to get GPS from screen position in OnlineMapsControlBase is marked "throw new NotImplementedException();" ... about line 300.

I added new function building on existing one, actually just a 1 line change.

    public virtual bool GetCoordsFromScreen(out double lng, out double lat, Vector2 position)
    {
        return GetCoords(out lng, out lat, position);
    }

This allows for example getting GPS coords from screen centre or some other spot rather than under mouse click.
Any chance of adding into next upgrade?
cheers

Re: getting GPS from screen position

Hello.

This does not make sense, because this method is overridden in the child classes.
Now we have marked this method abstract, so as not to confuse you and other users.
We have not done this before to reduce the number of compilation directives.

Why do you need GetCoordsFromScreen, if you can use GetCoords directly?

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: getting GPS from screen position

Ok, so I am learning more about your software, (and wishing I could code like this ... I am at a much more simple level).
Didn't realise that GetCoords  actually comes from OnlineMapsTileSetControl.
This makes way more sense in what it does and options available.

So my problem originally was getting GPS from a screen position that was NOT under my mouse pointer. I couldn't see how that would work looking at OnlineMapsControlBase .

Anyway, once again, thanks for your knowledge (and patience), my problem is resolved by using GetCoords , so scratch my earlier suggestion, have removed my code from there. smile