0

I am using this library in my app to load the Google map on the web using this answer as a reference, I am able to add the marker on it but wondering how I can do the marker on tap action

Adding marker:

final _icon = jsMap.Icon()
      ..scaledSize = jsMap.Size(60, 60)
      ..url = 'https://www.freeiconspng.com/thumbs/pin-png/pin-png-9.png';

final marker = jsMap.Marker(
      jsMap.MarkerOptions()
          ..position = latLng1
          ..map = map
          ..title = 'Test Title1'
          ..icon = _icon
        );

1 Answer 1

0

I am able to do the on click action using the below code:

final infoWindow =
        jsMap.InfoWindow(jsMap.InfoWindowOptions()..content = 'This is the content inside the Info window');
    marker.onClick.listen((event) => infoWindow.open(map, marker));

It may help someone!

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.