# MapViewer

Xojo provides a <span class="title-ref">MapViewer</span> control for web and mobile projects:

- `WebMapViewer</api/user_interface/web/webmapviewer>`
- `MobileMapViewer</api/user_interface/mobile/mobilemapviewer>`

## Common members

These events, methods and properties are both common amongst the mobile and web versions of the control and are the most commonly used. See the individual controls for more members and details.

### Events

| Name             | Description                                                  |
|------------------|--------------------------------------------------------------|
| LocationSelected | The user has tapped on a location (displayed as a pin).      |
| Pressed          | The user has long pressed/tapped on the map at the location. |

### Methods

| Name           | Description                                          |
|----------------|------------------------------------------------------|
| AddLocation    | Adds location objects to the map, indicated by pins. |
| GoToLocation   | Centers the map on the provided position.            |
| RemoveLocation | Removes from the map the MapLocations passed.        |
| ToPicture      | Creates a Picture from the map.                      |

### Properties

| Name      | Description                                                                                       |
|-----------|---------------------------------------------------------------------------------------------------|
| Latitude  | The angular distance of the center of the map north or south of the equator.                      |
| Longitude | The angular distance of the center of the map east or west of the meridian at Greenwich, England. |
| MapType   | The type of map being displayed.                                                                  |

<div class="seealso">

`WebMapViewer</api/user_interface/web/webmapviewer>` and `MobileMapViewer</api/user_interface/mobile/mobilemapviewer>`

</div>
