在新版手机地图中Q矢量图替换原本的2D画面为用户呈现出全新?D界面Q用户可以自q转动和羃放。此外用戯会获得ȝ地图览功能Q不用在览地图时保持在U状态?/p>
Google现在在其官方手机频道又放Z一D는Nexus Sq行新版Maps应用的全功能演示Q这ƾY件将会随Nexus S上市Q之后提供其他设备更斎ͼ但是Ҏ(gu)机硬件有一定的要求Q新?00MHz?GHz处理器且配有专用囑Ş核心的手机才能支?D视图?/p>
new OpenLayers.Request.GET( {
url : "http://search.tianditu.com/wfs?request=GetFeature",
params: {
typeName: "DOMAIN_POI_NEW",
FEATUREID: "DOMAIN_POI_NEW.6649356"
},
callback : handler
});
//使用BBOX查询
new OpenLayers.Request.GET( {
url : "http://search.tianditu.com/wfs?request=GetFeature",
params: {
typeName: "DOMAIN_POI_NEW",
BBOX: "105.99,29.99,106,30" //map.getExtent().toBBOX()
},
callback : handler
});
说明Q?br />
url WFS服务器地址Q必d?request=GetFeature
typeName 囑ֱ名称
FEATUREID WFS的图元IDQ采用标准格式: [囑ֱ名].[OID~号]
BBOX 指定区域查询Q注意不要设|过大,否则览器可能失d应?/p>
通过POST方式讉K“天地?#8221;WFS服务Q可以用OpenLayers.Request.POSTc,CZ代码如下Q?/p>
var xmlPara = "<?xml version='1.0' encoding='UTF-8'?>"
+ "<wfs:GetFeature maxFeatures='100' service='WFS' version='1.0.0' "
+ "xmlns:wfs='http://www.opengis.net/wfs' "
+ "xmlns:gml='http://www.opengis.net/gml' "
+ "xmlns:ogc='http://www.opengis.net/ogc' "
+ "xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' "
+ "xsi:schemaLocation='http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/wfs.xsd'>"
+ "<wfs:Query typeName='iso19112:SI_Gazetteer' srsName='EPSG:4326'>"
+ "<ogc:Filter xmlns:ogc='http://www.opengis.net/ogc'>"
+ "<ogc:And><ogc:PropertyIsLike wildCard='*' singleChar='.' escape='!'>"
+ "<ogc:PropertyName>STANDARDNAME</ogc:PropertyName>"
+ "<ogc:Literal>*解放?</ogc:Literal>"
+ "</ogc:PropertyIsLike></ogc:And></ogc:Filter>"
+ "</wfs:Query></wfs:GetFeature>";
var request = OpenLayers.Request.POST( {
url : "http://search.tianditu.com/wfs?",
data : xmlPara,
callback : handler
});
};
说明Q?/p>
url WFS服务器地址
data WFSh正文Q返回的GML由回调函数handler处理
handler负责处理服务端返回的GML数据Q也是矢量化的地图数据Q根据应用需求编写代码,获取feature的通用代码如下Q?br />
var g = new OpenLayers.Format.GML();
var features = g.read(req.responseText);
for ( var i = 0; i < features.length; ++i) {
var feature = features[i];
var geometry = feature.geometry;
var attributes = feature.attributes;
}
定义qo条g时请使用STANDARDNAME字段Q不要用DOMAINNAME字段Q前者应该有索引支持Q而后者没有,查询速度差别很大?/p>
l过试QtypeName="DOMAIN_POI_NEW"和typeName="iso19112:SI_Gazetteer"都能q回l果。由于缺官Ҏ(gu)档说明,不知道这两个囑ֱ有何区别?br />
试使用OpenLayers.Protocol.WFS无法讉K“天地?#8221;WFS服务Q服务器q回: h参数[REQUEST]的gؓI或不正?/p>
提醒: 使用POST查询Ӟ面文g或代码文件务必保存ؓutf-8~码Q如果用gbk、gb2312~码Q汉字地名会变成qQ导致javascript代码错误?/p>
数据cd |
数据?/span> |
U别 |
服务地址 |
U划地图 |
全球1:100万地理底?/span> |
2-10U?/span> |
http://tile0.tianditu.com/services/A0512_EMap http://tile0.tianditu.com/services/AB0512_Anno |
全国1:25万公开版数?/span>地Ş?/span> |
11-12U?/span> |
http://tile0.tianditu.com/services/B0627_EMap1112 |
|
全国车蝲D |
13-18U?/span> |
http://tile0.tianditu.com/services/siwei0608 |
|
卫星影像 |
全球250c_星媄?/span> (MODIS) |
2-7U?/span> |
http://tile0.tianditu.com/services/sbsm0210 |
全国15c_星媄?/span> (ETM) |
8-10U?/span> |
||
全国2.5c_星媄?/span> (P5) |
11-14U?/span> |
http://tile0.tianditu.com/services/e11 http://tile0.tianditu.com/services/e12 |
|
地城市0.6c_星媄?/span> (QuickBird?/span>WorldView I?/span>WorldView II) |
15-18U?/span> |
http://tile0.tianditu.com/services/sbsm1518 |
|
数字高程模型 |
全球90X90cx字高E模?/span> |
|
http://tile0.tianditu.com/services/J07098 |
地名地址 |
全球1:100万地名地址 |
|
http://search.tianditu.com/wfs |
全国1:25万地名地址 |
|||
全国车蝲D地名地址 |
GeoSurf
外,没有M变化。不知道Openlayers目l就此作何感惟?br />
正因为如此,我们可以参考OpenLayers.Layer.TileCache和OpenLayers.Layer.XYZc,~写一个专用于d“天地?#8221;的TDTLayerc,使Openlayers能够直接讉K“天地?#8221;的在U地图数据?br />
“
天地?#8221;地理信息数据资源列表地囄片分?6U(L=2-18Q,其中L=2U比例尺最,对应全球地图?br />
L=2U只?个瓦片文Ӟ分别?/span>Q?br />
X= 0 1 2 3 0 1 2 3 Y= 0 0 0 0 1 1 1 1
L=3U有32个瓦片文Ӟ分别是:
X= 0-7
Y= 0-3
L=4U有128个瓦片文Ӟ分别是:
X= 0-15
Y= 0-7
其余各以此cLQ每U的瓦片文g数比前一U增?倍,其中U划地图10U以上,卫星地图8U以上只提供中国境内的数据,没有覆盖全球?br />
查看
GeoGlobe APIM?code class="jscript plain">GeoSurfJSAPI.js文gQ相当于Openlayers.jsQ?/code>Q可以了解X(x_num)、Y(y_num)、L(level)的生成方法,伪代码如下:
level=getLevelForResolution(map.getResolution()); //计算瓦片U别
coef=TopTileSize.w/Math.pow(2,level); //中间pL
x_num=this.pyramid.topTileFromX<this.pyramid.topTileToX?Math.round((bounds.left-this.pyramid.topTileFromX)/coef):Math.round((this.pyramid.topTileFromX-bounds.right)/coef);
y_num=this.pyramid.topTileFromY<this.pyramid.topTileToY?Math.round((bounds.bottom-this.pyramid.topTileFromY)/coef):Math.round((this.pyramid.topTileFromY-bounds.top)/coef);
Ҏ(gu)当前分L率计地囄片?br />
function getLevelForResolution(res){
var ratio=map.getMaxResolution()/res;
if(ratio<1)return 0;
for(var level=0;ratio/2>=1;)
{level++;ratio/=2;}
return level;
}
l过单测试,“天地?#8221;和谷歌地囑֜数据上差别不大,二次开发方面借助于强?code class="jscript plain">
的Openlayers地图客户端引擎不会弱于Google Map APIQ唯独在速度上与h地图存在较大差距Q特别是地图攑֤?3U?18U时Qgq变得非常明显,有时甚至无法昄?br />
使用Firebug跟踪q行发现Q大U?/3的地囄片请求超ӞD客户端读取失败?br />
“天地?#8221;目前q处于测试阶D,希望相关单位l箋改进和提升服务器端性能Q快速稳定的响应大量客户端发出的q发h?br />
试中发玎ͼ“天地?#8221;开攄地图数据服务接口?span lang="EN-US">tile0.tianditu.com一直到tile7.tianditu.com。依ơping q?个服务接口,tile1?/span>tile7的响应速度相对较快。修改客L(fng)js代码Q将瓦片地图hq_发送给tile0?/span>tile7 八个服务接口Q可以有效加快地图显C速度?/span>“天地?#8221;提供的GeoSurfJSAPI.js?/code>已经包含相关代码Q通过lLayer的mirrorUrl属性赋|可以均衡d指定的多个服务接口,代码如下Q?br />
var layer3 = new GeoSurf.Layer.GlobeTile("siwei0608", "http://tile6.tianditu.com/services/siwei0608", {
transitionEffect: "resize",
topLevel: 13,
bottomLevel: 18,
maxExtent: new GeoSurf.Bounds(100, 27, 110, 34),
mirrorUrls: [
"http://tile1.tianditu.com/services/siwei0608",
"http://tile2.tianditu.com/services/siwei0608",
"http://tile3.tianditu.com/services/siwei0608",
"http://tile4.tianditu.com/services/siwei0608",
"http://tile5.tianditu.com/services/siwei0608",
"http://tile6.tianditu.com/services/siwei0608"
]
});
客户端用上q读取策略后Q即便放大到17-18U,整幅地图也能够完全显C,速度有明昄提升?br />

]]>
Something users have asked for since the addition of WMS support itself is cascading, the ability of GeoServer to proxy for another remote WMS server like MapServer or another GeoServer. This feature has many uses such as pulling in a remote base layer and overlaying local vector data onto it or securing a locally unsecured map server. Special thanks to the University of Perugia for sponsoring this feature.
Read more about WMS cascading.
Anyone who has published a large number of layers or feature types with GeoServer has probably at some point been annoyed by the fact that every single layer is published by a single global service. WMS has the ability to group and nest layers but WFS and WCS have no such equivalent. Well now with virtual services one can create multiple service endpoints within a single physical geoserver instance.
Special thanks to Landgate for funding this work.
Read more about virtual services.
GeoServer has always been good at publishing a flat database table. But users often need to do more such as pre filter the data in a table, or join two tables together, or generate column values on the fly with a function. Before this feature the recommendation was to create a view. However views can be a maintenance burden and are at times problematic.
Now one can create a layer directly from an SQL query. And on top of that query definitions can be parameterized which allows one to create dynamic queries on the fly. These parameters can be restricted with regular expressions in order to prevent an SQL injection security hole.
Special thanks to Andrea for spending much of his personal time on this one. And also to OBIS who provided the funding for the parametric component of the work.
Read more about SQL layers.
With 2.1 and the arrival of WPS we welcome a new OGC service to the family. The Web Processing Service is an OGC service for performing geospatial analysis functions over the web. The specification is extensible in nature and allows for simple processes like buffering a geometry to more complex processes such as image processing.
Historically GeoServer has been focused primarily on data delivery without any tools for performing analysis of spatial data. WPS fills that gap making GeoServer a more compete solution for geospatial web services.
Thanks to Refractions Research for the initial contribution of the WPS module and to Andrea once again for taking personal time to bring WPS support to its current state.
Read more about WPS. Download the WPS extension now to try it out.
Support for units in SLD allows one to specify values in measurements other than pixels such as feet or meters. This adds a very powerful capability to SLD that in many cases alleviates the need for multiple scale dependent rendering rules. This has the upside of greatly simplifying complex SLD documents.
Special thanks to Milton Jonathan who did the initial GeoTools work to make unit of measure support possible and to Andrea for working with Milton to improve the initial patch. Note that this feature has also been backported to the stable 2.0.x branch. Thanks to SWECO and Malmö City of Sweden for sponsoring the backport.
Read more about UOM support.
By default GeoServer renders images at a resolution of 90 DPI. While this is acceptable for the standard screen it is not acceptable for print which requires a higher resolution. Now it is possible to supply a format option to a WMS request on the fly that controls the DPI setting.
Special thanks again to SWECO and to Malmö City of Sweden for sponsoring this work. Note also that this feature has also been backported to the stable 2.0.x branch.
Read more about DPI scaling.
注意Q不要在FROM之前加入属性字D名Q属性字D可d在FROM后的子查询中Q如下所C?br />"Test Map",
GEOLOC FROM (SELECT MI_PRINX AS OID, NAME AS ONAME, COLOR AS COLOR, GEOLOC AS GEOLOC FROM NAV_ROAD1) USING SRID 4326
LABEL或STYLE用到的属性字D必d含在SELECT子查询中?br />
修改openlayers客户端代?br />
var ms_layer = new OpenLayers.Layer.WMS(