Package org.locationtech.udig.catalog.internal.wmt

Examples of org.locationtech.udig.catalog.internal.wmt.WMTScaleZoomLevelMatcher


        try {
            WMTSource wmtSource = getWMTSourceOfSelectedLayer();

            if (wmtSource != null) {
                // get the zoom-level for this scale
                WMTScaleZoomLevelMatcher zoomLevelMatcher = getZoomLevelMatcher(wmtSource);

                int zoomLevel = wmtSource.getZoomLevelFromMapScale(zoomLevelMatcher,
                        WMTRenderJob.getScaleFactor());

                setSelectedZoomLevel(zoomLevel);
View Full Code Here


    private void zoomToZoomLevel(int zoomLevel) {
        try {
            WMTSource wmtSource = getWMTSourceOfSelectedLayer();
           
            if (wmtSource != null) {               
                WMTScaleZoomLevelMatcher zoomLevelMatcher = getZoomLevelMatcher(wmtSource);
                double scale = zoomLevelMatcher.getOptimumScaleFromZoomLevel(zoomLevel,
                        wmtSource);
                   
                zoomToScale(scale);
            } else {
                throw new Exception("wmtSource is null"); //$NON-NLS-1$
View Full Code Here

           
            // we also need the map-scale to calculate the recommended zoom-level       
            double mapScale = layer.getMap().getViewportModel().getScaleDenominator();
            ReferencedEnvelope mapExtentMapCrs = layer.getMap().getViewportModel().getBounds();
           
            WMTScaleZoomLevelMatcher zoomLevelMatcher = WMTScaleZoomLevelMatcher.createMatcher(
                    mapExtentMapCrs, mapScale, wmtSource);
           
            return wmtSource.getZoomLevelFromMapScale(zoomLevelMatcher, scaleFactor);
        } catch (Exception exc) {
            WMTPlugin.log("[WMTLayerPropertyPage.getDefaultZoomLevel] Failed ", exc); //$NON-NLS-1$
View Full Code Here

TOP

Related Classes of org.locationtech.udig.catalog.internal.wmt.WMTScaleZoomLevelMatcher

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.