在gwt上弹出openlayers,显示html链接并在onclick上执行操作

时间:2019-03-06 07:24:35

标签: javascript gwt popup openlayers openstreetmap

我已经使用openlayers完成了一个应用程序,并显示了包含HTML链接的弹出窗口。当我单击此链接时,没有答案。

有人可以帮我吗?

  

操作:

public void onClick(ClickEvent event) {
            Object source = event.getSource();

            if (source == detailLink) {
                if (occurrence != null) {
                    parent.switchView(DETAIL, false);
                    closeInfoWindows();
                    occurrenceListener.onOccurrenceSelected(occurrence);
                }
            } else if (source == showLayersLink) {
                if (occurrence != null) {
                    LayerInfoPopup layerInfoPopup = LayerInfoPopup.getInstance();
                    layerInfoPopup.loadLayersInfo(occurrence);
                }
            }

        }
  

显示弹出窗口:

                popup = new FramedCloud("id1", marker.getLonLat(), null, summaryContent.toString(), null, true);
                popup.setPanMapIfOutOfView(true);
                popup.setAutoSize(true);
                mapWidget.getMap().addPopup(popup); 

0 个答案:

没有答案