NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

Hi Gibt es eine Möglichkeit, sich die ausgewählten koordinaten per xml zurückgeben zu lassen, wenn man mit der Maus auf die Karte klickt?

Die Rückgabe per xml habe ich bereits mittels Nomination gefunden, wenn man dort eine Adresse übermittelt. Ich benötige dies jedoch beim Anklicken eines bestimmten Punktes auf der Karte.

Ich wäre für Tipps oder für Hinweise auf die richtige Hilfeseite dankbar.

asked 14 Nov '16, 05:02

HAL2016's gravatar image

HAL2016
11112
accept rate: 0%

edited 14 Nov '16, 19:34

aseerel4c26's gravatar image

aseerel4c26 ♦
32.6k18248554

Google translation from German

Return coordinates of clicked point on map by xml

Hi Is there a way to get the selected coordinates returned by xml by clicking on the map with the mouse?

The return by xml I have already found by means of nomination, if one there an address transmitted. I need this however when clicking a certain point on the map.

I would be grateful for tips or hints for the correct help.

(14 Nov '16, 23:56) nevw

This has nothing to do with OpenStreetMap or Nominatim, it is a feature of OpenLayers or Leaflet or whatever library you use to display a map. For OpenLayers 2 see this example but Leaflet and OpenLayers 3 work similarly. The coordinates are passed as an arguement to a callback function, where you can format them in XML or any other way you want.

Das hat mit OpenStreetMap oder Nominatim nichts zu tun, sondern ist eine Eigenschaft von OpenLayers oder Leaflet oder welche Bibliothek auch immer Du benutzt, um die Karte anzuzeigen. Für OpenLayers 2 gibt es dieses Beispiel, aber Leaflet und OpenLayers 3 funktionieren ähnlich. Die Koordinaten werden einer Callback-Funktion übergeben, und dort kann man sie als XML oder beliebig anders formatieren.

permanent link

answered 14 Nov '16, 07:27

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

If you also want to retrieve map data around this position then take a look at Overpass API.

Falls du zusätzlich die Kartendaten an dieser Position haben möchtest dann schau dir die Overpass API an.

(14 Nov '16, 07:46) scai ♦

Prima! Danke für den Hinweis. Ich schau mir mal das Beispiel mal an.

(14 Nov '16, 07:56) HAL2016

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×286
×113
×20
×6
×1

question asked: 14 Nov '16, 05:02

question was seen: 2,900 times

last updated: 14 Nov '16, 23:56

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum