Long-tap/drag/drop Skobbler skannotation to new position - ios

I'm looking to allow my users to drag & drop annotations on my maps, initiated by a long-press on the annotation pin. I can't find anything in the documentation that would handle this.
Can someone point me in the right direction?
Edit: I realize I may not have been as clear as I thought I was.
Currently, my users are able to add new annotations to the map by long-pressing at a location on the map. I'd like for them to be able to move those annotations to a different location.

For adding a new PIN, the SKMapViewDelegate protocol is used to receive map-related update messages.
Check: http://developer.skobbler.com/docs/ios/2.4.0/Protocols/SKMapViewDelegate.html

Related

swift - update directions when user moves

I am writing an app where a user can select a location and then it will display the directions to it on the map. This functionality works fine, however I need the route to update on the map as the user moves. Currently I am using the didupdatelocations method and creating a new direction line from the new user location, however this results in the polyline being completely redrawn. I am trying to find a way to update the directions as the user moves similar to how apple maps/google maps does this. I do not want to use the navigation window if possible.
I am using the Apple mapKit.
i have looked for similar problems this one with google maps but there have been no replies.
I have seen another example (sorry cannot find link again) which makes an array of all the coordinates in the polyline although im not sure where i would use this or how to use this to slice or remove the unwanted part of the polyline.
At the moment my code does remove all overlays when a new direction is called, but if the overlays are not removed then I will end up with loads of lines on the map. I have tested removing the first polyline after the second polyline is created but that doesn't seem a very efficient way of dealing with this.
would appreciate any suggestions.

Is it possible to change a route by dragging its polyline in a GMSMapView?

I'm currently working on an app using the latest version of the Google Maps SDK for iOS and I've been wondering if it's possible to achieve the same "drag and drop" feature available in the web version of Google Maps to get a custom route.
After completely reading the official documentation I still haven't found an answer or guidance related to this feature, so any help will be appreciated.
Enabling the drag and drop feature can be done by creating an instance of GMDraggableMarkerManager and sets itself as the delegate in order to be notified of drag events.
Steps given in google-maps-sdk-ios-drag-drop are as follows:
To initialize the drag & drop functionality you have to import
the GMDraggableMarkerManager.h in your UIViewController displaying
the map.
Create a property for the GMDraggableMarkerManager.
After the initialization of the Google Maps View you have to
initialize the draggableMarkerManager.
Please note that to fully implement drag and drop feature, a long press on the marker enables you to drag it around and set it to another position
This SO post -
How to implement GMSMarker drag drop on GMSMapView? might also help.

Apple Maps Location Marker like in Find Friends App

I have an app where I want the user to place a marker on a map and drag a circle to define a range around that notification, exactly as in Apple's Find Friends App (when you pick one of your friends and subscribe for notifications when he arrives or leaves a certain location).
Looks like this:
The marker can be dragged and moved like always, but the solid circle on the right side is used to define a range around the marker.
Does anyone have an idea on how to implement that? Maybe someone has already implemented something like this and wants to share his code :-).
Thanks.
Ok, I found some very useful sourcecode. Here it is, in case somebody else needs it as well: https://github.com/d0ping/DBMapSelectorViewController

how to let user drop interactive pin/marker on one uiimage

Right now I am working on one application which needs to have an interactive image.
While the user is viewing this image, they should be able to drop pin/marker onto the image by tap any location on the image. Once a pin/marker is dropped on the image, user should be able to tap the pin/marker again to add some comments to the pin, delete this pin/marker or even some other operation.
Right now, I am using the MKOverlayView to hold my image and put the MKOverlayView into a MKMapView so that I can use customized annotations to do that. However, there are always some zooming issues when I limited the visible region of the view(Because I do not need the entire world map). More importantly, I find out that I cannot get rid of the leftbuttom legal link(I need to submit my app to app store. And Apple does not allow it.) Also, each time when I first load the app, I can definitely see the mapping is loading and the map grid. And I do not want user to see it.
So I am thinking to find some other ways. Can anyone provide me a more feasible way to implement it, like some similar project example or tutorial? Any help is appreciated.
Thanks

Save Map Annotation

I just created a map view where the user can make an annotation by dropping a pin. How is it possible to save the annotation, so the user can see it when the app is closed and re-opened? Does anyone know a good tutorial for saving map annotations? Thanks!
Map annotations are nothing different to regular data. The answer to this will depend on many things. For example:
How do you save other data in your map?
How many pins do you need to keep track of?
If you are only saving one pin and thus one lat and one long value, you could use NSUserDefaults. There are lots of tutorials for that around. Here's just one example: http://iphonedevsdk.com/forum/iphone-sdk-tutorials/106311-tutorial-1-how-to-use-nsuserdefault.html

Resources