Examples of GroundOverlay


Examples of com.google.gwt.maps.client.overlay.GroundOverlay

      // generate bounds that covers center map with half the width and height
      LatLngBounds rectBounds = LatLngBounds.newInstance(LatLng.newInstance(
          southWest.getLatitude() + latDelta, southWest.getLongitude()
              + lngDelta), LatLng.newInstance(northEast.getLatitude() - latDelta,
          northEast.getLongitude() - lngDelta));
      groundOverlay = new GroundOverlay("boot.jpg", rectBounds);
      groundOverlay.addGroundOverlayVisibilityChangedHandler(new GroundOverlayVisibilityChangedHandler() {

        public void onVisibilityChanged(
            GroundOverlayVisibilityChangedEvent event) {
          if (event.isVisible()) {
View Full Code Here

Examples of de.micromata.opengis.kml.v_2_2_0.GroundOverlay

        return numFeatures;
    }

    void encodeGroundOverlay(Folder container, Layer layer, int drawOrder, Envelope box) {
        GroundOverlay go = container.createAndAddGroundOverlay();
        go.setDrawOrder(drawOrder);
        Icon icon = go.createAndSetIcon();
        String href = WMSRequests.getGetMapUrl(request, layer, 0, box, new String[] { "width",
                "256", "height", "256", "format", "image/png", "transparent", "true" });
        icon.setHref(href);
        LOGGER.fine(href);

        // make sure the ground overlay disappears as the lower tiles activate
        addRegion(go, box, 128, 512);

        LatLonBox llBox = go.createAndSetLatLonBox();
        setEnvelope(box, llBox);
    }
View Full Code Here

Examples of de.micromata.opengis.kml.v_2_2_0.GroundOverlay

         * @param layer
         */
        private void addGroundOverlay(Folder folder, Layer layer) {
            int mapLayerOrder = context.getMapContent().layers().indexOf(layer);

            GroundOverlay go = folder.createAndAddGroundOverlay();
            go.setName(layer.getTitle());
            go.setDrawOrder(mapLayerOrder);
            Icon icon = go.createAndSetIcon();
            icon.setHref(getGroundOverlayHRef(layer));
            icon.setViewRefreshMode(ViewRefreshMode.NEVER);
            icon.setViewBoundScale(0.75);

            ReferencedEnvelope box = new ReferencedEnvelope(context.getMapContent()
                    .getRenderingArea());
            boolean reprojectBBox = (box.getCoordinateReferenceSystem() != null)
                    && !CRS.equalsIgnoreMetadata(box.getCoordinateReferenceSystem(),
                            DefaultGeographicCRS.WGS84);
            if (reprojectBBox) {
                try {
                    box = box.transform(DefaultGeographicCRS.WGS84, true);
                } catch (Exception e) {
                    throw new ServiceException("Could not transform bbox to WGS84", e,
                            "ReprojectionError", "");
                }
            }

            LatLonBox gobox = go.createAndSetLatLonBox();
            gobox.setEast(box.getMinX());
            gobox.setWest(box.getMaxX());
            gobox.setNorth(box.getMaxY());
            gobox.setSouth(box.getMinY());
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.