Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
4
Erster Beitrag:
vor 5 Jahren, 6 Monaten
Letzter Beitrag:
vor 5 Jahren, 6 Monaten
Beteiligte Autoren:
Paul Murray, Cesar Flores

WDM17 - Map Control - Automated Zoom Level based on coordinates

Startbeitrag von Paul Murray am 07.01.2013 04:43

Greetings All,

Has anyone done enough with the WDM17 Map Control to try to automatically determine the zoom level?

I have a situation where one of my lat/longs will be constant.

The second lat/long can be anywhere from a few hundred feet away to maybe 50 miles away.

So I am looking for a technique to determine the midpoint lat/long, center the map on that midpoint lat/long and then select a zoom level (from 1 to 21) that will best fit the distance.

I know from trial and error that if the two points are about a mile apart that zoom level 19 works great.

But if the two points are 20 miles apart, even if I center the map on the midpoint lat/long the user will be cursing me out trying to zoom in or zoom out to make sense of the map because the repainting the map is a SLOW process in either WDM17, Android or the Samsung Galaxy Tab.

I suspect I will have to get out my college math book and bone up on sine, arc and tangents. :(

Thanks for any ideas!!

Best,

Paul

Antworten:

I just realized that I posted this twice.

I had so many tabs open that I didn't realize I had two posts for the same subject.

My apologies to all.

von Paul Murray - am 07.01.2013 04:54
Hi paul

i don't know why you have problems with the zoom level if the map control allows you to load a complete interactive map. i mean that the end user can zoom in or move the map with his fingers at will.

in other way if you are using just an image of a map (Staticmap) you can do this helped by google's webservices and an image control.

or maybe i do not understand your problem. if this is the case just ignore me

best regards

von Cesar Flores - am 08.01.2013 14:52
Thanks, Cesar.

In this case the user is greeting people arriving on international flights.

The 'Greeter' needs to know where the vehicle is immediatly while the passenger is standing there. Manually zooming in and out and sliding the map back and forth trying to find the car (if it is late) takes a long time to update in the map control.

By determining the center point (lat/long) between the Greeter and vehicle, I should be able to select an optimum zoom level that shows both the Greeter and the Vehicle. So then there is no need to do a manual zoom or slide the map looking for the car in who knows what direction.

Best,

Paul

von Paul Murray - am 08.01.2013 15:11
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.