There's more...

The Cordova Google Maps plugin has many more features, such as the following:

  • Showing an InfoWindow
  • Adding a marker with multiple lines
  • Modifying icons
  • Text styling
  • Base64-encoded icons
  • Clicking on a marker
  • Clicking on an InfoWindow
  • Creating a draggable marker
  • Dragging events
  • Creating a flat marker

Since you cannot pop up a div on top of native Google Maps, the marker features are very handy. Some additional scenarios are as follows:

  • Touch a marker and go to a page: You just need to listen to the GoogleMapsEvent.MARKER_CLICK event and do whatever is needed in the callback function.
  • Show an avatar/profile image as a marker: The addMarker takes the Base64 image string. Thus, you can pass something like this in the argument ...

Get Ionic Cookbook - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.