本文整理汇总了Java中org.gwtopenmaps.openlayers.client.layer.XYZ类的典型用法代码示例。如果您正苦于以下问题:Java XYZ类的具体用法?Java XYZ怎么用?Java XYZ使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
XYZ类属于org.gwtopenmaps.openlayers.client.layer包,在下文中一共展示了XYZ类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getLayer
import org.gwtopenmaps.openlayers.client.layer.XYZ; //导入依赖的package包/类
@Override
public Layer getLayer() {
XYZOptions layerOptions = new XYZOptions();
layerOptions.setSphericalMercator(true);
XYZ xyzLayer = new XYZ(esriLayerName, url, layerOptions);
xyzLayer.setIsBaseLayer(false);
return xyzLayer;
}
开发者ID:geowe,项目名称:sig-seguimiento-vehiculos,代码行数:11,代码来源:XYZLayerDef.java
示例2: init
import org.gwtopenmaps.openlayers.client.layer.XYZ; //导入依赖的package包/类
@Override
protected void init() {
mapWidget = new MapWidget("100%", "100%", new MapOptions());
// Humanitarian layer
final OSMOptions hotOption = new OSMOptions();
hotOption.setIsBaseLayer(true);
hotOption.crossOriginFix();
hotOption.setSphericalMercator(true);
XYZ HOTLayer = new XYZ(I18N.CONSTANTS.humanitarianOSMLayer(), "http://a.tile.openstreetmap.fr/hot/${z}/${x}/${y}.png", hotOption);
// Basic layer
OSM osmMapnik = new OSM();
osmMapnik.setName(I18N.CONSTANTS.basicOSMLayer());
osmMapnik.setIsBaseLayer(true);
// Pin layer
vectorLayer = new Vector(I18N.CONSTANTS.projectSitesLayer());
// Drag & drop listeners
dragFeature = createDraggableFeature(vectorLayer);
// Center & zoom
LonLat lonLat = new LonLat(0, 0);
lonLat.transform(TRANSFORM_SOURCE, mapWidget.getMap().getProjection());
mapWidget.getMap().addLayer(HOTLayer);
mapWidget.getMap().addLayer(osmMapnik);
mapWidget.getMap().addLayer(vectorLayer);
mapWidget.getMap().addControl(new LayerSwitcher());
mapWidget.getMap().setCenter(lonLat, 1);
mapWidget.getMap().updateSize();
getRoot().add(mapWidget);
setInitialized(true);
}
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:38,代码来源:OpenStreetMapWorldMap.java
示例3: initializeMap
import org.gwtopenmaps.openlayers.client.layer.XYZ; //导入依赖的package包/类
/**
* <p>initializeMap</p>
*/
private void initializeMap() {
final MapOptions mo = new MapOptions();
mo.setProjection(PROJECTION_SPHERICAL_MERCATOR.getProjectionCode());
mo.setDisplayProjection(PROJECTION_LAT_LON);
mo.setMaxExtent(new Bounds(-180, -90, 180, 90).transform(PROJECTION_LAT_LON,PROJECTION_SPHERICAL_MERCATOR));
m_mapWidget = new MapWidget("100%", "100%", mo);
m_mapHolder.add(m_mapWidget);
m_map = m_mapWidget.getMap();
m_map.addControl(new PanZoomBar());
m_map.addControl(new MousePosition());
m_map.zoomTo(2);
initializeImageError();
XYZOptions xyzOptions = new XYZOptions();
xyzOptions.setSphericalMercator(true);
xyzOptions.setAttribution("Default tiles courtesy of <a href=\"http://open.mapquest.co.uk/\">MapQuest</a>");
XYZ x = new XYZ("OpenStreetMap", getLayerUrl(), xyzOptions);
x.setIsBaseLayer(true);
x.setIsVisible(true);
m_map.addLayer(x);
m_markersLayer = new Markers("Remote Pollers");
m_markersLayer.setIsVisible(true);
m_markersLayer.setIsBaseLayer(false);
m_map.addLayer(m_markersLayer);
/*
final LayerSwitcher switcher = new LayerSwitcher();
m_map.addControl(switcher);
*/
m_map.zoomToMaxExtent();
Window.addResizeHandler(new ResizeHandler() {
public void onResize(ResizeEvent event) {
syncMapSizeWithParent();
}
});
}
开发者ID:qoswork,项目名称:opennmszh,代码行数:45,代码来源:OpenLayersMapPanel.java
注:本文中的org.gwtopenmaps.openlayers.client.layer.XYZ类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论