Google Map

Overview of the *Google Map Component

The Google Map component allows you to embed Google Maps into your app.

📘

Google Maps web browser API key is required for the component to work properly. Set the Google API Key on the App Settings page of your app.

Properties

🚧

Important Note!

This document lists the properties that are specific to this particular UI component.
To check for the properties common for most UI components, please check the General components document.

The Google Map component has the following Common properties:

Property NameProperty Description
Map TypeThe map MapType ID. The allowed values are roadmap (default), hybrid, satellite, terrain, string.
Full Screen ControlThe initial enabled/disabled state of the fullscreen control.
Gesture HandlingControl how gestures on the map are handled. Allowed values are cooperative, greedy, none, auto. The default is set to auto.
Map DraggableEnable to make the map draggable.
Zoom ControlThe enabled/disabled state of zoom control.
If set to True (default), the zoom control can be used on the map.
ZoomThe zoom level of the map. The default zoom level is set to 8.
Disable ZoomIf set to True, the map zoom cannot be used when double-clicking. Defaults are set to False.
ScrollwheelThe Scrollwheel property set to true/false enables/disables the scroll wheel to scale the Google Map.
The Scrollwheel property with a null value is used for working Gesture Handling property with a cooperative value.
Scrollwheel is enabled by default.
View pointGoogle Map viewpoint properties:
Latitude defines the center of the map.
Longitude defines the center of the map.

📘

Note

Use the agm-map prefix to increase the priority of your custom classes.

Example: agm-map.map {.....}

Visit the Angular+ Google Map Documentation to read more about Angular+ Google Map.
Visit the Google Map JS API Documentation to read more about Google Map JS API.

📘

Want to know more?

You can also check this document on the Google Map component sample app demonstrating how to use this component in an Ionic app.

Read more about the Google Map properties here.

📘

You might also like this Appery.io Community video that shows how to create an Ionic application for choosing the best place for a party (using the voting functionality) by using the Google Map component:

Marker

By default, the Google Map component has one Marker.
To add another marker to the map, click the + button on the Marker icon:

493

The Marker component has the following properties:

Property NameProperty Description
Marker ClickableIf set to True(default), the marker can be clicked. The default value is set to true.
Marker DraggableIf set to True, the marker becomes draggable. The default value is set to False.
Add Info WindowIf set to True, an information window will be added to the marker. These properties exist only inside the visual editor.
Open Info WindowIf set to True (default), the info window will automatically open when the marker is clicked.
CoordsGoogle Map marker position.
latitude - the latitude position of the marker.
longitude - the longitude position of the marker.

📘

Info Window displays content (usually text or images) in a popup window above the map, at a given location. The info window has a content area and a tapered stem. The tip of the stem is attached to a mark on the map.

More details about Google Map Marker directives can be found here.

Google Map Window

Set Add Info Window to True for the Marker component to add a new Google Map Window:

The Google Map Window component has the following properties:

Property NameProperty Description
Is OpenSet the open state for the info window.
Disable Auto PanDisable auto-pan on open. By default, the info window will pan the map so that it is fully visible when it opens.
Max WidthThe maximum width of the info window, regardless of content width. This value is only considered if set before a call to open.
Z-IndexAll info windows are displayed on the map in order of their zIndex, with higher values displayed in front of info windows with lower values.

🚧

Setting the addInfoWindow property to False will remove the Google Map Window from the Marker (IonicGoogleMapMarkerBean region).

Here is more information about Google Map Window properties.

You might also like our Appery.io Community video that shows how to use the Google Maps component to get current geolocation with Appery.io Geo Service plug-in: