You are not logged in.
- Topics: Active | Unanswered
Announcement
*** NOTICE: forum.openstreetmap.org is being retired. Please request a category for your community in the new ones as soon as possible using this process, which will allow you to propose your community moderators.
Please create new topics on the new site at community.openstreetmap.org. We expect the migration of data will take a few weeks, you can follow its progress here.***
Please create new topics on the new site at community.openstreetmap.org. We expect the migration of data will take a few weeks, you can follow its progress here.***
#1 2015-07-10 10:39:06
- Kolibri8
- Member
- Registered: 2015-06-19
- Posts: 24
Ist eine Koordinate in einem Luftlinienradius oder nicht?
Hallo,
gibt es in Leaflet eine Funktion, die prüft, ob eine bestimmte Koordinate in einem Radius (Luftlinie reicht) von einer anderen Koordinate ist?
Alternativ kann ich natürlich über php/Pytagoras/Umrechnung Koordinaten in Strecke selber eine Lösung basteln, aber wenn es da etwas fertiges gibt, würde ich es gerne nutzen.
Kolibri
Offline
#2 2015-07-10 14:25:03
- ikonor
- Member
- Registered: 2010-11-08
- Posts: 637
- Website
Re: Ist eine Koordinate in einem Luftlinienradius oder nicht?
Offline
#3 2015-07-12 10:09:48
- Kolibri8
- Member
- Registered: 2015-06-19
- Posts: 24
Re: Ist eine Koordinate in einem Luftlinienradius oder nicht?
ikonor wrote:
LatLng distanceTo ?
Hallo Norbert,
ja, distanceTo trifft den Nagel schon auf den Kopf. Danke dafür.
In meinem Fall passt dann die serverseitige Programmierung zwar doch besser, aber über Deinen Tip mit distanceTo konnte ich die Haversine formula kennen lernen, die ich nun serverseitig anwende. Passt alles inzwischen sehr gut.
Kolibri
Offline