Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Unable to drag the annonation pin through diduserupdatelocation delegate and get details of respective location like: country name, street. #3843

Closed
abhinesh01 opened this issue Feb 6, 2016 · 6 comments
Labels
iOS Mapbox Maps SDK for iOS support

Comments

@abhinesh01
Copy link

No description provided.

@1ec5 1ec5 added the iOS Mapbox Maps SDK for iOS label Feb 6, 2016
@1ec5
Copy link
Contributor

1ec5 commented Feb 6, 2016

If I understand correctly, you’re asking about getting data from the map in textual form. #3172 will add an API called “featuresAt” that will let you get a limited amount of data about individual features that are visible on the map. However, generally speaking, if you want to get address data about a particular point on the map, please consider using the Mapbox Geocoding API.

@abhinesh01
Copy link
Author

@1ec5
how could i move annonation marker over the map ?

@friedbunny
Copy link
Contributor

@abhinesh01 Dragging or animating annotation movement is not supported yet.

Theoretically you could implement your own pan gesture recognizer and remove/re-add the annotation whenever the gesture point moved (something like this), but, even if this is possible, performance will almost certainly suck and I would not recommend it.

@abhinesh01
Copy link
Author

@friedbunny
Is it possible to drag map while keeping annotation pin static? if it is possible i like to get data from annotation pin with mapbox Geocoding apiwhen updating coordinates.

@1ec5
At #681 you said
you’ll need to implement the marker as a UIView that’s positioned above the map can you be little more elaborate on it plzz

@1ec5
Copy link
Contributor

1ec5 commented Feb 7, 2016

you’ll need to implement the marker as a UIView that’s positioned above the map

Instead of using an MGLAnnotation, create a UIView (perhaps a UIImageView) and center it over the MGLMapView. This UIView doesn’t have anything to do with the map view; it’s just an ordinary view that sits atop the map view. Then in the -mapView:regionDidChangeAnimated: method of your MGLMapViewDelegate, get the map view’s centerCoordinate property and look up that coordinate in the Geocoding API.

@abhinesh01
Copy link
Author

All of sudden when i am trying to run the app its shows as below screenshot
it doesn't appear anything blank map.
It used to work good perviously but now its doesnt load map and Does it
make any issue using API access token for two projects?

[image: Inline image 1]

On Mon, Feb 8, 2016 at 10:06 AM, Abhinesh Ch abhinesh@datasisar.com wrote:

Got it, I made mistake by interchanging long and latitude value in api.
Now its working fine
Thanks.

On Mon, Feb 8, 2016 at 3:01 AM, Abhinesh Ch abhinesh@datasisar.com
wrote:

Thanks so much, Got what i am looking for.
And i like to confirm is below coding is correct to get data
fromGeocoding API. Most of the time i am getting empty json or something
like below image.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
iOS Mapbox Maps SDK for iOS support
Projects
None yet
Development

No branches or pull requests

3 participants