1

我写了以下方法:

public static void setMarkOnMap(final MapWidget map, String place,
        final String content) {
    Geocoder geocoder = new Geocoder();
    geocoder.getLatLng(place, new LatLngCallback() {

        @Override
        public void onSuccess(LatLng point) {
            Marker marker = new Marker(point);
            map.addOverlay(marker);
            map.getInfoWindow().open(marker, new InfoWindowContent(content));
        }

        @Override
        public void onFailure() {}
    });
}

我调用了它两次,但在地图中只显示了一个 InfoWindow。

有没有办法使用 Google Maps API for GWT 显示多个信息窗口(来自标记)?

4

0 回答 0