FlowingCode/GoogleMapsAddon

Issue when adding markers

Closed this issue · 1 comments

Apparently there is an issue with adding markers on the map because it seems that when trying to add a marker on the map that is different to the gmaps.getCenter() the marker will not be added.

For example:

Button addMarker = new Button("Add Marker", ev -> {
				this.gmaps.addMarker("New Marker", this.gmaps.getCenter(), true, "");
});

will add a marker on the map while

Button addMarker = new Button("Add Marker", ev -> {
				this.gmaps.addMarker("New Marker", new LatLon(12.00d, 22.00d), true, "");
});

will not add it.

The issue has to do with the addMarker signature that is being used. When using the signature that takes as parameter the Google Map Marker the updateMarkers js is not being fired.