当前位置: 首页>>代码示例>>Java>>正文


Java Layer类代码示例

本文整理汇总了Java中org.gwtopenmaps.openlayers.client.layer.Layer的典型用法代码示例。如果您正苦于以下问题:Java Layer类的具体用法?Java Layer怎么用?Java Layer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Layer类属于org.gwtopenmaps.openlayers.client.layer包,在下文中一共展示了Layer类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createClickControl

import org.gwtopenmaps.openlayers.client.layer.Layer; //导入依赖的package包/类
public SelectFeature createClickControl(Layer layer,
		UnselectFeatureListener unSelectListener,
		ClickFeatureListener clickFeatureListener) {

	SelectFeatureOptions clickSelectFeatureOptions = new SelectFeatureOptions();
	clickSelectFeatureOptions.onUnSelect(unSelectListener);
	clickSelectFeatureOptions.clickFeature(clickFeatureListener);
	clickSelectFeatureOptions.setToggle();
	clickSelectFeatureOptions.setMultiple();

	SelectFeature clickSelectFeature = new SelectFeature((Vector) layer,
			clickSelectFeatureOptions);

	clickSelectFeature.setClickOut(true);

	return clickSelectFeature;
}
 
开发者ID:geowe,项目名称:sig-seguimiento-vehiculos,代码行数:18,代码来源:MapControlFactory.java

示例2: onRelease

import org.gwtopenmaps.openlayers.client.layer.Layer; //导入依赖的package包/类
@Override
protected void onRelease() {
	VectorLayer layer = (VectorLayer) layerManager
			.getSelectedLayer(LayerManagerWidget.VECTOR_TAB);
	selectedFeatures = layer.getSelectedFeatures();
	if (selectedFeatures == null || selectedFeatures.length == 0) {
		messageDialogBuilder.createError(UIMessages.INSTANCE.warning(),
				UIMessages.INSTANCE.noSelectedElements()).show();
		return;
	}

	List<Layer> vectorLayers = layerManager.getLayerTree(
			LayerManagerWidget.VECTOR_TAB).getLayers();
	copyElementDialog.setLayers(vectorLayers);
	copyElementDialog.show();
}
 
开发者ID:geowe,项目名称:sig-seguimiento-vehiculos,代码行数:17,代码来源:CopyElementTool.java

示例3: getLayer

import org.gwtopenmaps.openlayers.client.layer.Layer; //导入依赖的package包/类
@Override
public Layer getLayer() {
	
	final WMTSOptions wmtsOptions = new WMTSOptions(getUrl(), getLayerName(),
               "", getTileMatrixSet());
       	wmtsOptions.setName(getLayerName());
       	wmtsOptions.setIsBaseLayer(Boolean.FALSE);
       	wmtsOptions.setFormat(getFormat());
       	wmtsOptions.setDisplayOutsideMaxExtent(true);	
       	wmtsOptions.setNumZoomLevels(GeoMapInitializer.MAX_NUM_ZOOM_LEVEL);
       	wmtsOptions.setProjection(GeoMap.INTERNAL_EPSG);
       	wmtsOptions.setTransitionEffect(TransitionEffect.RESIZE);
        wmtsOptions.setAttribution(getAttribution());

       	return new WMTS(wmtsOptions);		
}
 
开发者ID:geowe,项目名称:sig-seguimiento-vehiculos,代码行数:17,代码来源:WmtsLayerDef.java

示例4: getLayer

import org.gwtopenmaps.openlayers.client.layer.Layer; //导入依赖的package包/类
@Override
public Layer getLayer() {
	Layer layer = null;
	
	try {
		final VectorLayerConfig layerConfig = getVectorLayerConfig();
		layerConfig.setGeoDataString(file.getText());
		layer = VectorLayerFactory.createVectorLayerFromGeoData(layerConfig);
	} catch (Exception e) {
		AlertMessageBox messageBox = new AlertMessageBox(
				UIMessages.INSTANCE.warning(),
				UIMessages.INSTANCE.gditAlertMessage());
		messageBox.show();
	}
	
	return layer;
}
 
开发者ID:geowe,项目名称:sig-seguimiento-vehiculos,代码行数:18,代码来源:SampleFileVectorLayerDef.java

示例5: createLayerFromCatalog

import org.gwtopenmaps.openlayers.client.layer.Layer; //导入依赖的package包/类
private void createLayerFromCatalog(final String layerCatalog) {
	final LayerDef layerDef = appLayerCatalog.getLayer(layerCatalog);
	if (layerDef == null) {
		autoMessageBox.hide();
		messageDialogBuilder.createWarning(UIMessages.INSTANCE.warning(),
				UICatalogMessages.INSTANCE.layerNotInCatalog(layerCatalog))
				.show();
	} else {
		if (layerDef instanceof MultiLayerDef) {
			layerDef.getLayer(); // Internamente realiza la carga de capas
		} else {
			autoMessageBox.show();
			final Layer newLayer = layerDef.getLayer();
			LayerLoader.load(newLayer);
			autoMessageBox.hide();
		}
	}
}
 
开发者ID:geowe,项目名称:sig-seguimiento-vehiculos,代码行数:19,代码来源:URLVectorLayerInitializer.java

示例6: getLayer

import org.gwtopenmaps.openlayers.client.layer.Layer; //导入依赖的package包/类
@Override
public Layer getLayer() {
	WMSParams wmsParams = new WMSParams();
	wmsParams.setFormat(format);
	wmsParams.setLayers(layerName);
	wmsParams.setTransparent(true);		
	
	WMSOptions wmsLayerParams = new WMSOptions();
	wmsLayerParams.setProjection(epsg);
	wmsLayerParams.setTransitionEffect(TransitionEffect.RESIZE);
	wmsLayerParams.setDisplayOutsideMaxExtent(true);			
	wmsLayerParams.setNumZoomLevels(GeoMapInitializer.MAX_NUM_ZOOM_LEVEL);
	wmsLayerParams.setIsBaseLayer(true);
	String attribution = getAttribution();
	if(attribution != null) {
		wmsLayerParams.setAttribution(attribution);
	}
	
	WMS wmsLayer = new WMS(getName(), url, wmsParams, wmsLayerParams);
	wmsLayer.setIsBaseLayer(false);

	return wmsLayer;	
}
 
开发者ID:geowe,项目名称:sig-seguimiento-vehiculos,代码行数:24,代码来源:WmsLayerDef.java

示例7: getLayer

import org.gwtopenmaps.openlayers.client.layer.Layer; //导入依赖的package包/类
@Override
public Layer getLayer() {

	TMSOptions tmsOptions = new TMSOptions();
	tmsOptions.setDisplayOutsideMaxExtent(true);
	tmsOptions.setNumZoomLevels(GeoMapInitializer.MAX_NUM_ZOOM_LEVEL);
	tmsOptions.setProjection(GeoMap.INTERNAL_EPSG);
	tmsOptions.setTransitionEffect(TransitionEffect.RESIZE);
	tmsOptions.setIsBaseLayer(false);
	tmsOptions.setType(getFormat());
	tmsOptions.setGetURL(getMyUrl());

	TMS tms = new TMS(getName(), getUrl(), tmsOptions);

	return tms;

}
 
开发者ID:geowe,项目名称:sig-seguimiento-vehiculos,代码行数:18,代码来源:TmsLayerDef.java

示例8: onRelease

import org.gwtopenmaps.openlayers.client.layer.Layer; //导入依赖的package包/类
@Override
protected void onRelease() {
	final Layer[] mapLayers = geoMap.getMap().getLayers();
	final List<LayerDef> catalogLayers = appLayerCatalog.getAllLayers();
	final List<LayerDef> availableLayers = new ArrayList<LayerDef>();
	addedLayers = new ArrayList<LayerDef>();

	for (final LayerDef layerDef : catalogLayers) {
		if (layerAlreadyExists(layerDef.getName(), mapLayers)) {
			addedLayers.add(layerDef);				
		} else {
			availableLayers.add(layerDef);
		}
	}

	layerCatalogDialog.initialize(availableLayers, addedLayers);
	layerCatalogDialog.show();
}
 
开发者ID:geowe,项目名称:sig-seguimiento-vehiculos,代码行数:19,代码来源:LayerCatalogTool.java

示例9: addSelectedLayers

import org.gwtopenmaps.openlayers.client.layer.Layer; //导入依赖的package包/类
private void addSelectedLayers() {
	final Layer[] mapLayers = geoMap.getMap().getLayers();
	addedLayers = layerCatalogDialog.getAddedLayers();

	for (final LayerDef layerDef : addedLayers) {
		try {
			
			if (!layerAlreadyExists(layerDef.getName(), mapLayers)) {
				if(layerDef instanceof MultiLayerDef) {
					layerDef.getLayer(); //Internamente realiza la carga de capas						
				}
				else {
					final Layer newLayer = layerDef.getLayer();
					addLayer(newLayer, layerDef);
				}					
			}
		} catch (Exception ex) {
			Info.display(
					UIMessages.INSTANCE.layerCatalogToolText(),
					UIMessages.INSTANCE.errorLoadingLayer(layerDef.getName()));
		}
	}
	autoMessageBox.hide();
}
 
开发者ID:geowe,项目名称:sig-seguimiento-vehiculos,代码行数:25,代码来源:LayerCatalogTool.java

示例10: updateStatusInfo

import org.gwtopenmaps.openlayers.client.layer.Layer; //导入依赖的package包/类
private void updateStatusInfo() {
	if (vectorLayers != null) {
		List<VectorLayerInfo> vectors = new ArrayList<VectorLayerInfo>();

		for (Layer layer : vectorLayers) {
			vectors.add(new VectorLayerInfo((Vector) layer));
		}

		layerStore.clear();
		layerStore.addAll(vectors);
		layerCombo.redraw();
	}

	if (selectedLayer != null) {
		layerCombo.setValue(new VectorLayerInfo(selectedLayer));
	}
}
 
开发者ID:geowe,项目名称:sig-seguimiento-vehiculos,代码行数:18,代码来源:PreviewWidget.java

示例11: getFoot

import org.gwtopenmaps.openlayers.client.layer.Layer; //导入依赖的package包/类
private VerticalPanel getFoot() {
	slider.setWidth("290px");
	slider.disable();
	slider.setIncrement(1);

	slider.addValueChangeHandler(new ValueChangeHandler<Integer>() {

		@Override
		public void onValueChange(final ValueChangeEvent<Integer> event) {
			final Layer layer = getSelectedLayer(getSelectedTabName());
			layer.setOpacity((float) (event.getValue().intValue() / 100.0));
		}

	});

	final VerticalPanel panel = new VerticalPanel();
	panel.setWidth("300px");
	panel.addStyleName(ThemeStyles.get().style().borderTop());
	panel.add(new HTML(UIMessages.INSTANCE.lmOpacityHtmlLabel()));
	panel.add(slider);

	panel.add(statusBar);
	return panel;
}
 
开发者ID:geowe,项目名称:sig-seguimiento-vehiculos,代码行数:25,代码来源:LayerManagerWidget.java

示例12: createSelectHover

import org.gwtopenmaps.openlayers.client.layer.Layer; //导入依赖的package包/类
public SelectFeature createSelectHover(Layer layer) {
	createSelectHoverOptions();

	SelectFeature selectHoverFeature = new SelectFeature((Vector) layer,
			selectFeatureHoverOptions);
	selectHoverFeature.setClickOut(false);
	selectHoverFeature
			.addFeatureHighlightedListener(featureToolTipShowListener);
	selectHoverFeature
			.addFeatureUnhighlightedListener(featureToolTipHideListener);
	selectHoverFeature.setToggle(true);

	return selectHoverFeature;
}
 
开发者ID:geowe,项目名称:sig-seguimiento-vehiculos,代码行数:15,代码来源:MapControlFactory.java

示例13: createSelectionControl

import org.gwtopenmaps.openlayers.client.layer.Layer; //导入依赖的package包/类
public SelectFeature createSelectionControl(Layer layer) {

		SelectFeature clickSelectFeature = new SelectFeature((Vector) layer);

		clickSelectFeature.setClickOut(true);
		clickSelectFeature.setToggle(true);
		clickSelectFeature.setMultiple(true);
		clickSelectFeature.setToggleKey("ctrlKey");
		clickSelectFeature.setMultipleKey("shiftKey");

		return clickSelectFeature;
	}
 
开发者ID:geowe,项目名称:sig-seguimiento-vehiculos,代码行数:13,代码来源:MapControlFactory.java

示例14: createCircleControl

import org.gwtopenmaps.openlayers.client.layer.Layer; //导入依赖的package包/类
public DrawFeature createCircleControl(Layer layer,
		DrawFeatureOptions drawFeatureOptions) {
	RegularPolygonHandlerOptions handlerOptions = new RegularPolygonHandlerOptions();
	handlerOptions.setSides(30);
	handlerOptions.setSnapAngle(0);
	handlerOptions.setIrregular(false);

	drawFeatureOptions.setHandlerOptions(handlerOptions);

	DrawFeature drawCircleFeatureControl = new DrawFeature((Vector) layer,
			new RegularPolygonHandler(), drawFeatureOptions);

	return drawCircleFeatureControl;
}
 
开发者ID:geowe,项目名称:sig-seguimiento-vehiculos,代码行数:15,代码来源:MapControlFactory.java

示例15: createRegularPoligonControl

import org.gwtopenmaps.openlayers.client.layer.Layer; //导入依赖的package包/类
public DrawFeature createRegularPoligonControl(Layer layer) {
	RegularPolygonHandlerOptions boxHandlerOptions = new RegularPolygonHandlerOptions();
	boxHandlerOptions.setIrregular(true);

	DrawFeature drawRegularPolygonControl = new DrawFeature((Vector) layer,
			new RegularPolygonHandler());
	((RegularPolygonHandler) drawRegularPolygonControl.getHandler())
			.setOptions(boxHandlerOptions);

	return drawRegularPolygonControl;
}
 
开发者ID:geowe,项目名称:sig-seguimiento-vehiculos,代码行数:12,代码来源:MapControlFactory.java


注:本文中的org.gwtopenmaps.openlayers.client.layer.Layer类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。