FlowingCode / GoogleMapsAddon

Vaadin Addon based on Google Maps Web Component
https://www.flowingcode.com/en/open-source/
Apache License 2.0
20 stars 7 forks source link

Marker is not being shown if it is added after map was added to its container #59

Closed paodb closed 2 years ago

paodb commented 2 years ago

This comes from directory:

"I have to add the GoogleMap object to its container last. Any other place in the code no GoogleMapMarker are shown at first show of the map (I had to remove and add them again)."

It should be possible to add a marker after the map is added to the container.

Example to reproduce this:

      GoogleMap gmaps = new GoogleMap(apiKey, null, null);
      gmaps.setMapType(MapType.ROADMAP);
      gmaps.setCenter(new LatLon(-31.636036, -60.7055271));
      gmaps.setSizeFull();     
      add(gmaps);
      gmaps.addMarker(
          new GoogleMapMarker("You are here!", gmaps.getCenter(), false, Markers.GREEN));
paodb commented 2 years ago

After some testing, I've discovered that the issue can be fixed in the web-component so I've created this new ticket in order to work on the fix. Once the release of the fix in the web-component is done, I will update the add-on with the new version.

paodb commented 2 years ago

Fixed by https://github.com/FlowingCode/google-map/issues/13.

paodb commented 2 years ago

Fix is out with new release 1.6.0.