Search in sources :

Example 1 with Zoom

use of org.discotools.gwt.leaflet.client.controls.zoom.Zoom in project opennms by OpenNMS.

the class NodeMapWidget method addZoomControl.

private void addZoomControl() {
    LOG.info("NodeMapWidget.addZoomControl()");
    final ZoomOptions options = new ZoomOptions();
    options.setPosition("topright");
    m_map.addControl(new Zoom(options));
}
Also used : ZoomOptions(org.discotools.gwt.leaflet.client.controls.zoom.ZoomOptions) Zoom(org.discotools.gwt.leaflet.client.controls.zoom.Zoom)

Example 2 with Zoom

use of org.discotools.gwt.leaflet.client.controls.zoom.Zoom in project activityinfo by bedatadriven.

the class MapEditorMapView method setZoomControlOffsetX.

public void setZoomControlOffsetX(int offset) {
    zoomControlOffsetX = offset;
    if (map != null) {
        try {
            Zoom zoomControl = map.getMap().getZoomControl();
            Element container = zoomControl.getContainer();
            container.getStyle().setMarginLeft(zoomControlOffsetX, Unit.PX);
        } catch (Exception e) {
            Log.error("Exception thrown while setting zoom control", e);
        }
    }
}
Also used : HasReportElement(org.activityinfo.ui.client.page.report.HasReportElement) Element(com.google.gwt.dom.client.Element) GenerateElement(org.activityinfo.legacy.shared.command.GenerateElement) MapReportElement(org.activityinfo.legacy.shared.reports.model.MapReportElement) Zoom(org.discotools.gwt.leaflet.client.controls.zoom.Zoom)

Aggregations

Zoom (org.discotools.gwt.leaflet.client.controls.zoom.Zoom)2 Element (com.google.gwt.dom.client.Element)1 GenerateElement (org.activityinfo.legacy.shared.command.GenerateElement)1 MapReportElement (org.activityinfo.legacy.shared.reports.model.MapReportElement)1 HasReportElement (org.activityinfo.ui.client.page.report.HasReportElement)1 ZoomOptions (org.discotools.gwt.leaflet.client.controls.zoom.ZoomOptions)1