Package org.gwtopenmaps.openlayers.client

Examples of org.gwtopenmaps.openlayers.client.Map


     * @param wmcOptions
     * @return map object
     */
    public Map read(String input, WMCOptions wmcOptions)
    {
        Map map = Map.narrowToMap(FormatImpl.read(getJSObject(), input, wmcOptions.getJSObject()));

        return map;
    }
View Full Code Here


            super(eventObject.getJSObject());
        }

        public LonLat getLonLat()
        {
            Map map = Map.narrowToMap(this.getSourceJSObject());
            Pixel pixel = Pixel.narrowToPixel(getJSObject().getProperty("xy"));

            return (pixel != null) ? map.getLonLatFromPixel(pixel) : null;
        }
View Full Code Here

    public Map read(String input) {
        if (this.wmcOptions == null) {
            throw new IllegalStateException("The property wmcOptions must not "
                    + "be null.");
        }
        Map map = Map.narrowToMap(FormatImpl.read(getJSObject(), input,
                this.wmcOptions.getJSObject()));

        return map;
    }
View Full Code Here

            super(eventObject.getJSObject());
        }

        public LonLat getLonLat()
        {
            Map map = Map.narrowToMap(this.getSourceJSObject());
            Pixel pixel = Pixel.narrowToPixel(getJSObject().getProperty("xy"));

            return (pixel != null) ? map.getLonLatFromPixel(pixel) : null;
        }
View Full Code Here

      public void run() {
        MapOptions defaultMapOptions = new MapOptions();
        defaultMapOptions.setNumZoomLevels(16);
        final MapWidget mapWidget = new MapWidget("100%", "100%", defaultMapOptions);
        mapContainer.add(mapWidget);
        final Map map = mapWidget.getMap();

        OSM osm = OSM.Mapnik("Mapnik");
        osm.setIsBaseLayer(true);
        map.addLayer(osm);
        vectorLayer = new Vector("Fence");
        map.addLayer(vectorLayer);
        markers = new Markers("Markers");
        map.addLayer(markers);
        map.addControl(new OverviewMap());
        map.addControl(new ScaleLine());

        ModifyFeatureOptions featureOptions = new ModifyFeatureOptions();
        featureOptions.setMode(ModifyFeature.RESIZE);
        featureOptions.onModificationEnd(new ModifyFeature.OnModificationEndListener() {
          @Override
          public void onModificationEnd(VectorFeature vectorFeature) {
            float diameter = vectorFeature.getGeometry().getBounds().getWidth();
            storeBinder.getModel().setRadius(diameter / 2);
          }
        });

        storeBinder.addPropertyChangeHandler("radius", new PropertyChangeHandler<Double>() {
          @Override
          public void onPropertyChange(PropertyChangeEvent<Double> event) {
            reDrawGeoFence(map);
          }
        });

        modifyControl = new ModifyFeature(vectorLayer, featureOptions);
        map.addControl(modifyControl);

        placeMarkerAtStoreLocation(map);

        map.addMapMoveEndListener(new MapMoveEndListener() {

          @Override
          public void onMapMoveEnd(MapMoveEndEvent eventObject) {
            Bounds extent = map.getExtent();
            extent.transform(DEFAULT_PROJECTION, new Projection("EPSG:900913"));

            // set up autocomplete search box for this place
            AutocompleteType[] types = new AutocompleteType[2];
            types[0] = AutocompleteType.ESTABLISHMENT;
View Full Code Here

TOP

Related Classes of org.gwtopenmaps.openlayers.client.Map

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.