Examples of IMap


Examples of org.locationtech.udig.project.IMap

    return null;
  }

  @Override
  public CoordinateReferenceSystem getCrs() {
    final IMap currentMap = ApplicationGIS.getActiveMap();
    if (!currentMap.equals(ApplicationGIS.NO_MAP)) {
        return currentMap.getViewportModel().getCRS();
    }
    return null;
  }
View Full Code Here

Examples of org.locationtech.udig.project.IMap

        return false;
    }

    private boolean desinationContainsLayer( ILayer layer) {
        if( getDestination() instanceof IMap ){
        IMap map=(IMap) getDestination();
        if( map.getMapLayers().contains(layer) )
            return true;
        }
        return false;
    }
View Full Code Here

Examples of org.locationtech.udig.project.IMap

            seperateGeoResources(resources, otherData, data2);
        }
       
        int layerpos=-1;
        layerpos = calculateDropPosition();
        IMap map=null;
        if( !otherData.isEmpty() ){
            for( Object object : otherData ) {
                Collection<IGeoResource> additionalResources = toResources(monitor, object, getClass());
               
                ProjectUIPlugin.trace(Trace.DND, MapDropAction.class,
View Full Code Here

Examples of org.locationtech.udig.project.IMap

            return Collections.emptyList();
        }
    }

    private void addResourcesToMap( List<IGeoResource> resources, int layerpos,IMap map2 ) {
        IMap map=map2;
        if( getDestination() instanceof Layer){
            Layer layer=(Layer) getDestination();
            map=layer.getMap();
        } else if( getDestination() instanceof IMap ){
            map = (IMap) getDestination();
        }
        if (map==null )
            map = ApplicationGIS.getActiveMap();
        if( map==ApplicationGIS.NO_MAP ){
            ProjectUIPlugin.trace(Trace.DND, getClass(), "Creating new Map with from resources: "+resources, null); //$NON-NLS-1$
            ApplicationGIS.addLayersToMap((IMap)null, resources, layerpos);
        }else{
            ProjectUIPlugin.trace(Trace.DND, getClass(), "Add layers to "+map.getName()+" from resources: "+resources, null)//$NON-NLS-1$//$NON-NLS-2$
            ApplicationGIS.addLayersToMap(map, resources, layerpos, null, true);
        }
    }
View Full Code Here

Examples of org.locationtech.udig.project.IMap

        featurePage = new FeaturePanelPage(this);
       
        featurePage.init( pageSite );       
        featurePage.setFeatureSite(new FeatureSiteImpl());
        featurePage.createControl(book);
        final IMap map = ApplicationGIS.getActiveMap();
        if (map != ApplicationGIS.NO_MAP) {
            try {
                editFeatureChanged(map.getEditManager().getEditFeature());
            } catch (Throwable e) {
                UiPlugin.log("Default SimpleFeature Editor threw an exception", e); //$NON-NLS-1$
            }
        }
       
View Full Code Here

Examples of org.locationtech.udig.project.IMap

            book.showPage( messagePage.getControl() );
            return;
        }
        // pass the selection to the page
       
        IMap activeMap = ApplicationGIS.getActiveMap();
        IFeatureSite site = featurePage.getFeatureSite();
        if( site == null ){
            site = new FeatureSiteImpl(activeMap);
            featurePage.setFeatureSite(site);      
        }
View Full Code Here

Examples of org.locationtech.udig.project.IMap

         * @return Object[]
         */
        public Object[] getChildren( Object arg0 ) {

            if (arg0 instanceof IMap) {
                IMap map = (IMap) arg0;

                List<ILayer> layers = map.getMapLayers();

                return filteredLayers(layers);
            } else if (arg0 instanceof ILayer) {
                return null;
            }
View Full Code Here

Examples of org.locationtech.udig.project.IMap

         *
         * @param arg0 the input data
         * @return Object[]
         */
        public Object[] getElements( Object arg0 ) {
            IMap map = ApplicationGIS.getActiveMap();
            return new Object[]{map};
        }
View Full Code Here

Examples of org.locationtech.udig.project.IMap

     * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
     */
    public void createPartControl( Composite parent ) {
        featureDisplay = new PropertySheetPage();
        featureDisplay.createControl(parent);
        final IMap map = ApplicationGIS.getActiveMap();
        if (map != ApplicationGIS.NO_MAP) {
            try {
                editFeatureChanged(map.getEditManager().getEditFeature());
            } catch (Throwable e) {
                UiPlugin.log("Default SimpleFeature Editor threw an exception", e); //$NON-NLS-1$
            }
        }
    }
View Full Code Here

Examples of org.locationtech.udig.project.IMap

    // feature under the cursor, so
    // this will return a feature.
    assert feature != null;

    // set map units.
    IMap map = handler.getContext().getMap();
    assert map != null;

    CoordinateReferenceSystem crs = MapUtil.getCRS(map);
    Unit<?> mapUnits = GeoToolsUtils.getDefaultCRSUnit(crs);
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.