Build Location Apps on iOS with Swift by Jeffrey Linwood

Build Location Apps on iOS with Swift by Jeffrey Linwood

Author:Jeffrey Linwood
Language: eng
Format: epub
ISBN: 9781484260838
Publisher: Apress


This is useful for removing individual markers or shapes or different groups of markers or shapes. If you’re processing search results and then displaying them on the map, you may want to clear all previous results off of the map before displaying the new results. To clear all markers and shapes off of the map and only display the map tiles, use the clear() method on the map view:mapView.clear()

You can now create any new markers or shapes that you need.

Conclusion

In this chapter, we discussed how to change the map tiles used in your map view, using the mapType property of the map view. We also added markers to our map and learned how to change the marker icon. When a user taps on a marker or info window, we also learned how to handle those events and how to pass custom data on a marker that we could use. Last, we looked at adding circles, polylines, and polygons and then how to remove markers and shapes.

In the next chapter, we build on our discussion of polylines and paths to provide driving directions from Google Directions API on a map view.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.