Okay, let's now talk about incorporating a map in your app. A map in your app, you can just redirect the user to a map application like Apple Maps, or Google Maps to see your company's location, for example. And then the user would be able to interact with the map application with your pin on it. Like he would be able to build routes to get there, etc. This topic is, however, about using a map within your app. And you might want to do that you need to provide more content and more interaction than just showing your location pin.
A map view lets you display geographical data within your app. And it supports most of the functionality provided by the built in Maps app. A map view can be configured to show a standard map, satellite imagery, or both. It can include pins and overlays. It supports zooming and panning If your app supports the routing, such as in the run tracking app, you can use a map view to display the route. Generally speaking, use a map view to give users an interactive view of a graphical area.
You can also add a segmented control and allow users to switch between the road mode, satellite mode and the hybrid mode. You can display annotations. They can be standard annotations like this one, or they can be custom. For example, here in the first image, we have a very minimalistic annotation, while on the right image. We have an annotation modified to include a custom image and a disclosure button, which is represented by the icon on the right side of the annotation. Another feature is displaying the overlays programmatically or by using images.
For example, you can highlight a path from the map Or you can highlight an area. programmatically, you can use coordinates and create sets of lines, rectangles, circles and polygon shapes, which can then be field or struct with color. For example, you might use overlays to lead traffic information on top of the roadways, highlight the boundaries of a park, or show city, state and national borders. Alternatively, you can use an image display is normally, for example, here we have a PNG overlay that provides some details for a certain area. In the end, you can do something like this. No, actually, please don't.
But as you can see, you can have a double Overlay and an annotation over a map. And let's not comment on the visual design here. Matthew supports both programmatic and user controlled zoom panning, used to control one is obvious, and you do it yourself often. But the programmatic one means that you can set a certain initial zoom for example, or pan around programmatically to show something specific. You can also display a regular routing. Of course, routing is also used in around tracking apps, for example, where the route you had run on is displayed.
And in general, let users interact with the map. People are accustomed to interacting with the map. They expect to be able to interact with your map in similar ways. Lastly, use the standard being colors in the consistent way. So a red or a destination point, green for a starting location, and purple for user specified location. I want to point out that we've been discussing incorporating basically the standard map from the built in Maps app If you're incorporating Google Maps, for example, then the details and specifics would be a little bit different.