Example usage for com.google.gwt.maps.client MapType getMaximumResolution

List of usage examples for com.google.gwt.maps.client MapType getMaximumResolution

Introduction

In this page you can find the example usage for com.google.gwt.maps.client MapType getMaximumResolution.

Prototype

public int getMaximumResolution() 

Source Link

Document

Returns the highest zoom level at which this map type is defined for a given point.

Usage

From source file:com.google.gwt.maps.sample.hellomaps.client.ControlsDemo.java

License:Apache License

public ControlsDemo() {
    map = new MapWidget(LatLng.newInstance(37.4419, -122.1419), 13);
    map.setSize("500px", "300px");
    initWidget(map);//from w w w.  java  2s .com
    map.addControl(new SmallMapControl());
    map.addControl(new MapTypeControl());

    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);

                minResolution = t.getMinimumResolution();
                maxResolution = t.getMaximumResolution();
                GWT.log("@ point: " + map.getCenter().toString() + " Map Type: " + t.getName(true)
                        + " Min resolution: " + minResolution + " Max Resolution: " + maxResolution, null);
            }
        }
    };
    timer.schedule(1000);
}