0

I would like to be able to have button in InfoWindow. I have tried to use title instead of content as below:

map.addEventListener(GoogleMapsEvent.MAP_CLICK).subscribe((e) => {
  let markerOptions: MarkerOptions = {
    position: e,
    title:"<button>Test</button",
    draggable: true
  };
  map.addMarker(markerOptions).then((marker: Marker) => {
    marker.showInfoWindow()
  });
});

When I tested it in my android device, it just show the String '<button>Test</button>' without any button. Is there any missing or any other functions to do that?

limmouyleng
  • 127
  • 1
  • 3
  • 15

1 Answers1

0

Content, not title

  let markerOptions: InfoWindowOptions = {
    position: e,
    content:"<button>Test</button",
    draggable: true
  };
misha130
  • 5,457
  • 2
  • 29
  • 51
  • It does not work. As in the document of ionic native of google maps here [link](https://ionicframework.com/docs/native/google-maps/#Marker) , it does not have content for marker options. – limmouyleng May 03 '17 at 01:54
  • Its InfoWindowOptions and not MarkerOptions – misha130 May 03 '17 at 11:50
  • I have tried to put InfoWindowOptions, but it does not work. Anyway, in the [link](https://ionicframework.com/docs/native/google-maps/), there is no InfoWindowOptions. Thanks. – limmouyleng May 04 '17 at 02:04