Package com.google.gwt.maps.client

Examples of com.google.gwt.maps.client.MapType


        TileLayer tileLayer = initTileLayer();
        MapWidget map = new MapWidget();
        map.setSize("300px", "300px");
        Projection projection = new MercatorProjection(20);
        assertNotNull("new MercatorProjection(20)", projection);
        MapType mapType = new MapType(new TileLayer[] {tileLayer}, projection,
            "MyMap");
        map.addMapType(mapType);
        RootPanel.get().add(map);
        map.setZoomLevel(10);
        map.setCurrentMapType(mapType);
View Full Code Here


        TileLayer tileLayer = initTileLayer();
        MapWidget map = new MapWidget();
        map.setSize("300px", "300px");
        Projection projection = new MercatorProjection(20);
        assertNotNull("new MercatorProjection(20)", projection);
        MapType mapType = new MapType(new TileLayer[] {tileLayer}, projection,
            "MyMap");
        map.addMapType(mapType);
        RootPanel.get().add(map);
        map.setZoomLevel(10);
        map.setCurrentMapType(mapType);
View Full Code Here

            assertTrue("tileSize > 0", tileSize > 0);
            return false;
          }
        };

        MapType mapType = new MapType(new TileLayer[] {tileLayer}, projection,
            "MyMap");
        map.addMapType(mapType);
        RootPanel.get().add(map);
        map.setCurrentMapType(mapType);
View Full Code Here

    loadApi(new Runnable() {
      public void run() {
        initTileLayer();
        TileLayer[] layers = new TileLayer[1];
        layers[0] = initTileLayer();
        @SuppressWarnings("unused")
        MapType t = new MapType(layers, new MercatorProjection(1),
            "versionTestLayer");
      }
    }, true, MAPS_MIN_VERSION);
  }
View Full Code Here

      public boolean isPng() {
        return true;
      }
    };

    MapType mapType = new MapType(new TileLayer[] {tileLayer},
        new MercatorProjection(20), "MyMap");
    map.addMapType(mapType);
    map.addControl(new MapTypeControl());

    vertPanel.add(map);
View Full Code Here

      initListByMapType("Mapmaker: ", MapType.getMapmakerMapTypes());

      lb.addChangeHandler(new ChangeHandler() {
        public void onChange(ChangeEvent event) {
          String selection = lb.getItemText(lb.getSelectedIndex());
          MapType mt = mapTypes.get(selection);
          if (mt != null) {
            map.setCurrentMapType(mt);
          }
        }
      });
View Full Code Here

    Timer timer = new Timer() {

      @Override
      public void run() {
        // Exercise the minimum & maximum resolution entry points.
        MapType types[] = map.getMapTypes();
        for (MapType t : types) {
          int minResolution = t.getMinimumResolution();
          int maxResolution = t.getMaximumResolution();
          GWT.log("Map Type: " + t.getName(true) + " Min resolution: "
              + minResolution + " Max Resolution: " + maxResolution, null);
View Full Code Here

    myCopyright.addCopyright(new Copyright(1, LatLngBounds.newInstance(
        LatLng.newInstance(-90, -180), LatLng.newInstance(90, 180)),
        minZoom, copyright));

    return new MapType(new TileLayer[] { new CustomTileLayer(myCopyright,
        minZoom, maxZoom, tileUrl, isPng, opacity) },
        new MercatorProjection(maxZoom - minZoom + 1), name);
  }
View Full Code Here

    public LatLng getCenter() {
        return map.getCenter();
    }

    public String getMapType() {
        MapType mapType = map.getCurrentMapType();
        if (MapType.getNormalMap().equals(mapType)) {
            return MAP_TYPE_NORMAL;
        } else if (MapType.getSatelliteMap().equals(mapType)) {
            return MAP_TYPE_SATELLITE;
        } else if (MapType.getPhysicalMap().equals(mapType)) {
            return MAP_TYPE_PHYSICAL;
        } else if (MapType.getHybridMap().equals(mapType)) {
            return MAP_TYPE_HYBRID;
        } else {
            throw new RuntimeException(
                    "map type persistence not supported for type "
                            + mapType.getName(false));
        }
    }
View Full Code Here

TOP

Related Classes of com.google.gwt.maps.client.MapType

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.