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

Hi ,

I am working on a project to implement maps in android. I have used OSMDroid and successfully displayed it.

I want to add markers on my map so I can form a path. Now I can add markers if I enter the GPS coordinates manually. But I want to add the markers automatically if i click on the map.

Is there any way to get this data? Please help.

PS : This is an offline map. I checked by giving GPS coordinates and having data off, the marker was added. So , I know that it can be done but I dont know how.

asked 21 Jul '14, 07:12

anshumank's gravatar image

anshumank
11223
accept rate: 0%

edited 09 Apr '15, 12:44

aseerel4c26's gravatar image

aseerel4c26 ♦
32.6k18248554


Osmdroid is some software that happens to use OSM data, rather than "part of OSM". There's a Google Group for it; people there will be more familiar with it than here.

However, it sounds like you're just asking "how do I get the current location on Android"? That stackoverflow questions links to examples and covers the issues, including whether you want to use Google Play Services or not.

permanent link

answered 21 Jul '14, 09:35

SomeoneElse's gravatar image

SomeoneElse ♦
36.9k71370866
accept rate: 16%

edited 21 Jul '14, 09:37

"I want to add the markers automatically if i click on the map" does not sound like getting the current (gps) location is the question (I have removed the "gps" tag therefore). "GPS coordinates" should likely just mean "coordinates".

(09 Apr '15, 12:37) aseerel4c26 ♦

Have a look at MapEventsReceiver from the osmbonuspack and this groups thread.

permanent link

answered 09 Apr '15, 10:37

bmla's gravatar image

bmla
16
accept rate: 0%

edited 09 Apr '15, 12:44

aseerel4c26's gravatar image

aseerel4c26 ♦
32.6k18248554

yes, "single tap" and "long press" sounds like what the question is, in my opinion. I have replaced your URL with the new one (according to the project's home page) since google code will vanish next year.

(09 Apr '15, 12:43) aseerel4c26 ♦

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:

×113
×98
×47
×6

question asked: 21 Jul '14, 07:12

question was seen: 10,593 times

last updated: 09 Apr '15, 12:45

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