Más contenido relacionado Similar a openlayers quick use (20) openlayers quick use2. 1.1 what is openlayers?
• OpenLayers, is an open source, client side JavaScript web
mapping library.
3. 1.2 why is openlayers?
像Google,Yahoo,Bing,百度,高德等都允许我们连接它们的地图服
务,同时也都提供client side的接口,但是这些商业地图服务提供商,存
在的问题是:
• 无法定制化(map client side, map server backend)
• 商业限制,使用成本
• 一些专业化的地图操作不满足,例如:
–
–
–
–
http://openlayers.org/dev/examples/editingtoolbar.html
http://openlayers.org/dev/examples/drag-feature.html
http://openlayers.org/dev/examples/modify-feature-bysegment.html
intersetc(),distanceto()
17. 6.1 Format, protocol and strategy
Protocol类用来控制矢量图层如何和数据源进行交互,通常使用有两种类
型:Protocol.HTTP和Protocol.WFS。
18. 6.2 Format, protocol and strategy
Format类用来决定输入或输出到什么格式类型的数据,我们可以用来读
入例如KML,GeoJSON格式的文件,也可以将feature对象以这些类型
反向输出。换句话说,Format用来控制feature数据的序列化和反序列
化。
19. 6.3 Format, protocol and strategy
Strategy类用来控制请求发送和响应处理的方式,它的子类有:
• Strategy.Fixed: 最简单的一种策略,feature数据只请求一次。
• Strategy.BBOX: 一种在Protocol.WFS协议下,用来仅获取当前地图
的可视范围内数据的策略。
• Strategy.Cluster: 一种feature组合策略。
• Strategy.Grid: 一种还处于sandbox,未正式release的策略,用来获
取矢量切片的策略。