Example usage for com.google.gwt.maps.client CopyrightCollection CopyrightCollection

List of usage examples for com.google.gwt.maps.client CopyrightCollection CopyrightCollection

Introduction

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

Prototype

private CopyrightCollection(JavaScriptObject jsoPeer) 

Source Link

Usage

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

License:Apache License

public CustomMapTypeDemo() {

    VerticalPanel vertPanel = new VerticalPanel();
    vertPanel.setStyleName("hm-panel");

    map = new MapWidget(LatLng.newInstance(33.7814790, -84.3880580), 13);
    map.setSize("500px", "450px");

    CopyrightCollection myCopyright = new CopyrightCollection("");
    myCopyright.addCopyright(new Copyright(1,
            LatLngBounds.newInstance(LatLng.newInstance(34, -81), LatLng.newInstance(36, -79)), 10, ""));
    TileLayer tileLayer = new TileLayer(myCopyright, 10, 18) {
        @Override/*from  w ww .  j a  va 2 s .  c om*/
        public double getOpacity() {
            return 1.0;
        }

        @Override
        public String getTileURL(Point tile, int zoomLevel) {
            return "http://www.google.com/apis/maps/documentation/examples/include/tile_crosshairs.png";
        }

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

    initWidget(vertPanel);
}

From source file:org.maps.client.ImageLayer.java

License:Apache License

public ImageLayer(String layerName, String urlPrefix) {
    CopyrightCollection cc = new CopyrightCollection("Mine");
    tileLayer = new GMapCreatorTileLayer(cc, 0, 11, 6);
    tileLayer.setUrlPrefix(urlPrefix);//www.ja  va 2s  .  c o  m
    TileLayerOverlay overlay = new TileLayerOverlay(tileLayer);
    setOverlay(overlay);
    setDisplayName(layerName);
}

From source file:org.maps.client.ImageLayer.java

License:Apache License

public ImageLayer(String layerName, String urlPrefix, String secondaryURLPrefix) {
    CopyrightCollection cc = new CopyrightCollection("Mine");
    tileLayer = new GMapCreatorTileLayer(cc, 0, 11, 6);
    tileLayer.setUrlPrefix(urlPrefix);/*from   www . j  a va2s .  c  o  m*/
    tileLayer.setSecondaryPrefix(secondaryURLPrefix);
    TileLayerOverlay overlay = new TileLayerOverlay(tileLayer);
    setOverlay(overlay);
    setDisplayName(layerName);
}