Various use cases with the GMap component
GMap can be used for various use cases apart from the basic usage of Google Maps. Maps will be more interactive using different kinds of overlays, events on maps, overlays, and so on.
Overlays
Overlays are objects on the map that are bound to latitude/longitude coordinates or dimensions. The array of overlay instances are binding through the overlays
property. Due to the nature of one-way binding, when there are changes from an array then the map will update automatically.
GMap supports various types of overlays, as shown here:
- Marker: Single locations on a map. Markers can also display custom icon images.
- Polyline: Series of straight lines on a map.
- Polygon: Series of straight lines on a map but the shape is "closed."
- Circle and rectangle: Represents a specific region as a circle/rectangle.
- Info windows: Displays content within a pop-up balloon on top of a map.
The GMap example usage with overlay options would be written as follows:
<p-gmap [options]=...