使用范例
编译mapcss样式表
pgmapcss --mode standalone -tol4pgm-0.1 test.mapcss
确保“ test.py”作为CGI脚本执行。
在您JavaScript中,加载地图和图层:
var map = new ol . Map ( {
target : 'map' ,
layers : [
new ol . layer . Tile ( {
source : new ol . source . MapQuest ( { layer : 'sat' } )
} )
] ,
view : new ol . View ( {
center : ol . proj . transform ( [ 37.41 , 8.82 ] , 'EPSG:4326' , 'EPSG:3857' ) ,