# GraffitiMapViewer
Class Inherits GraffitiWebUIControl
## About
GraffitiMapViewer provides Google Maps in a easy to use and manage class with support for markers, popups, symbols, heatmaps, and more.
## Compatibility
### Framework API Version
| 1.0 | 2.0 |
| :---: | :---: |
| True | True |
### Desktop
| 32-Bit | 64-Bit |
| :---: | :---: |
| True | True |
## Enumerations
| Name | Value | Description |
| --- | :---: | --- |
| GestureHandlingTypes | Auto <br> None <br> Cooperative <br> Greedy | Possible ways the map can interpret gestures. |
| MapStyles | Standard <br> Silver <br> Retro <br> Dark <br> Night <br> Aubergine <br> Custom | Supported map display styles. |
| MapTypes | Roadmap <br> Hybrid <br> Satellite <br> Terrain | Supported map display types. |
| ZoomLevels | World = 1 <br> Continent = 5 <br> City = 10 <br> Streets = 15 <br> Buildings = 20 | Supported zoom levels. |
## Event Definitions
| Name | Parameters | Return Type | Description |
| --- | :---: | :---: | --- |
| DoublePressed | x as Integer <br> y as Integer <br> position as GraffitiMap.Point | (None) | Raised when the user has double-pressed or -clicked the map. |
| FocusLost | (None) | (None) | |
| FocusReceived | (None) | (None) | |
| ImageOverlayDoublePressed | overlay as GraffitiMap.Overlays.Image <br> point as GraffitiMap.Point | (None) | Raised when an image overlay is double-pressed. |
| ImageOverlayPressed | overlay as GraffitiMap.Overlays.Image <br> point as GraffitiMap.Point | (None) | Raised when an image overlay is pressed. |
| MapTypeChanged | (None) | (None) | Raised when the user has changed the map type. |
| MarkerContextPressed | marker as GraffitiMap.Marker <br> pageX as Integer <br> pageY as Integer | (None) | Raised when the user had right-clicked the specified marker. |
| MarkerMouseEnter | marker as GraffitiMap.Marker | (None) | Raised when the user's mouse has entered the specified marker's display area. |
| MarkerMouseExit | marker as GraffitiMap.Marker | (None) | Raised when the user's mouse has exited the specified marker's display area. |
| MarkerPositionChanged | marker as GraffitiMap.Marker | (None) | Raised when the user has dragged the specified marker to a new position. |
| MarkerPressed | marker as GraffitiMap.Marker | (None) | Raise the user has double-pressed or -clicked the specified marker. |
| MouseEnter | (None) | (None) | Raised when user's mouse has entered the map's display area. |
| MouseExit | (None) | (None) | Raised when user's mouse has exited the map's display area. |
| Opening | (None) | (None) | |
| PopupHidden | popup as GraffitiMap.Popup | (None) | Raised when user has closed the specified popup by clicking its close button. |
| PositionChanged | (None) | (None) | Raised when the user has changed the map's position by dragging or zooming. |
| Pressed | x as Integer <br> y as Integer <br> position as GraffitiMap.Point | (None) | Raised when the user has pressed or clicked on the map's display. |
| Ready | (None) | (None) | Map is displayed and ready for interaction. |
| RouteChanged | route as GraffitiMap.Directions.Route | (None) | Raised when the Route has been edited by the user. |
| RouteError | route as GraffitiMap.Directions.Route <br> message as String | (None) | Raised when an error was encountered while the Directions API attempting to create the specified Route. |
| ShapeChanged | shape as GraffitiMap.Shapes.Shape | (None) | Raised when a shape has been altered or repositioned the user. |
| ShapeContextPressed | shape as GraffitiMap.Shapes.Shape <br> pageX as Integer <br> pageY as Integer | (None) | Raised when the user has right-clicked or long-pressed on a shape. |
| ShapeDoublePressed | shape as GraffitiMap.Shapes.Shape | (None) | Raised when the user has double-pressed or -clicked on the specified shape. |
| ShapeMouseEnter | shape as GraffitiMap.Shapes.Shape | (None) | Raised when the user's mouse has entered the shape's display area. |
| ShapeMouseExit | shape as GraffitiMap.Shapes.Shape | (None) | Raised when the user's mouse has exited the shape's display area. |
| ShapePressed | shape as GraffitiMap.Shapes.Shape | (None) | Raised when the user presses or clicks the specified shape. |
| ZoomChanged | (None) | (None) | Raised when the user has changed the ZoomLevel. |
## Methods
| Name | Parameters | Return Type | Description |
| --- | :---: | :---: | --- |
| Sub | AddHeatmap | (None) | Adds a new heatmap to map. |
| Sub | AddImageOverlay | (None) | Add the specified image overlay to the current map. |
| Sub | AddMapStyle | (None) | Adds a new MapStyle (set MapStyle to Custom). |
| Sub | AddMarker | (None) | Adds the specified marker to the map. |
| Sub | AddPopup | (None) | Adds the specified popup instance to the map (hidden until explicitly shown). |
| Sub | AddRoute | (None) | Adds the specified route to the map. |
| Sub | AddShape | (None) | Adds the specified shape to the map. |
| Sub | FitBounds | (None) | Pans and Zooms the map to display the specified area. |
| Function | HeatmapAt | As | Returns the heatmap at the specified index within the internal array. |
| Function | LastImageOverlayIndex | As | Index of the final image overlay present in the internal array. |
| Function | LastMarkerIndex | As | Index of the final marker present in the internal array. |
| Function | LastPopupIndex | As | Index of the final popup present in the internal array. |
| Function | LastRouteIndex | As | Index of the final route present in the internal array. |
| Function | LastShapeIndex | As | Index of the final shape present in the internal array. |
| Function | MarkerAt | As | Marker object at the specified index. |
| Sub | PanBy | (None) | Pans the map's display by X/Y in pixels. |
| Sub | PanTo | (None) | Scrolls the map to show the specified position. Alternatively, set the Position property. |
| Function | PopupAt | As | Returns the popup as the specified index. |
| Sub | RemoveAllHeatmaps | (None) | Removes all heatmaps from the component. |
| Sub | RemoveAllImageOverlays | (None) | Removes all image overlays from the component. |
| Sub | RemoveAllMarkers | (None) | Removes all markers from the component. |
| Sub | RemoveAllPopups | (None) | Removes all popups from the component. |
| Sub | RemoveAllRoutes | (None) | Removes all routes from the component. |
| Sub | RemoveAllShapes | (None) | Removes all shapes from the component. |
| Sub | RemoveHeatmap | (None) | Removes the specified heatmap from the component. |
| Sub | RemoveImageOverlay | (None) | Removes the specified image overlay. |
| Sub | RemoveMarker | (None) | Removes the specified marker. Use MarkerAt in conjunction with RemoveMarker to remove by index. |
| Sub | RemovePopup | (None) | Removes the specified popup. Use PopupAt in conjunction with RemovePopup to remove by index. |
| Sub | RemoveRoute | (None) | Removes the specified route. Use RouteAt in conjunction with RemoveRoute to remove by index. |
| Sub | RemoveShape | (None) | Removes the specified shape. Use ShapeAt in conjunction with RemoveShape to remove by index. |
| Function | RouteAt | As | Returns the route at the specified index. |
| Function | ShapeAt | As | Returns the shape at the specified index. |
## Properties
| Name | Type | Default Value | Description |
| --- | :---: | :---: | --- |
| APIKey | String | Nil | |
| BackgroundColor | Color | Nil | |
| CanDoubleClickToZoom | Boolean | Nil | |
| CanMouseWheelToZoom | Boolean | Nil | |
| CanUseKeyboard | Boolean | Nil | |
| DirectionsSidebarWidth | Integer | Nil | |
| GestureHandlingType | GestureHandlingTypes | Nil | |
| HasBicyclingLayer | Boolean | Nil | |
| HasDirectionsSidebar | Boolean | Nil | |
| HasFullScreenControl | Boolean | Nil | |
| HasPanControl | Boolean | Nil | |
| HasRotateControl | Boolean | Nil | |
| HasScaleControl | Boolean | Nil | |
| HasStreetViewControl | Boolean | Nil | |
| HasThreeWordsLayer | Boolean | Nil | |
| HasTrafficLayer | Boolean | Nil | |
| HasTransitLayer | Boolean | Nil | |
| HasZoomControl | Boolean | Nil | |
| Heading | Integer | Nil | |
| IsTilted | Boolean | Nil | |
| MapStyle | MapStyles | Nil | |
| MapStyleName | String | Nil | |
| MapType | MapTypes | Nil | |
| PerformThreeWordsLookups | Boolean | Nil | |
| Position | GraffitiMap.Point | Nil | |
| PositionW3W | GraffitiW3W.MapPoint | Nil | |
| Private | | GraffitiMap.Overlays.Heatmap | |
| Private | | GraffitiMap.Overlays.Image | |
| Private | As | Nil | |
| Private | As | Nil | |
| Private | As | = | |
| Private | As | = | |
| Private | As | = | |
| Private | As | = | |
| Private | | GraffitiMap.Popup | |
| Private | | GraffitiMap.Directions.Route | |
| Private | | GraffitiMap.Shapes.Shape | |
| Private | As | Nil | |
| Private | As | Nil | |
| Private | As | Nil | |
| Private | As | Nil | |
| Private | As | Nil | |
| Private | As | = | |
| Private | As | Nil | |
| Private | As | = | |
| Private | As | Nil | |
| Private | As | Nil | |
| Private | As | = | |
| Private | As | = | |
| Private | As | = | |
| Private | As | = | |
| Private | As | = | |
| Private | As | = | |
| Private | As | = | |
| Private | As | Nil | |
| Private | As | Nil | |
| Private | As | = | |
| Private | As | = | |
| Private | As | = | |
| Private | As | = | |
| Private | | GraffitiMap.Marker | |
| Private | As | Nil | |
| Private | As | Nil | |
| Private | As | = | |
| ZoomLevel | Integer | Nil | |
| ZoomLevelMaximum | Integer | Nil | |
| ZoomLevelMinimum | Integer | Nil | |