MapServer

URL:

http:// <Service-URL> / MapServer

父资源:

Service

服务接口:

capabilities   map   tile  

[ 服务说明 ]

MapServer是NewMapServer的地图服务,该服务提供了实时取图(map接口)和缓存图片(tile接口)两种模式的地图服务。

[ 参数说明 ]

参数 参数说明
format 参数作用:指定capabilities操作返回结果的格式
取值范围:html | json | kml | kmz,该参数默认值为html
callback 参数作用:Ajax客户端使用JSONP方式进行跨域处理时所指定的回调函数名称
参数说明:可选参数,该参数仅在format参数值为json时有效

[ 示例 ]

URL地址示例:
http://127.0.0.1:8099/newmap/rest/services/samples/china/MapServer?format=json

[ 返回结果 ]

    JSON格式返回值描述 :

{
    "serviceName": <servicename>,
    "serverType":"MapServer",
    "serverDescription":<server-description>,
    "capabilities":{
        "srs":<srscode>,
        "keywordlist":<keywordlist string>,
        "fees":<fees string>
    },
    "mapObject":{
        "name":<mapObject Name>,
        "srs":<srscode>,
        "extent":{
            "xmin":<xmin>,
            "ymin":<ymin>,
            "xmax":<xmax>,
            "ymax":<ymax>,
            "srs":<srscode>
        },
        "layers":[
            {"name":<layername>,"type":<layertype>,"srs":<srscode>,"extent":{"xmin":<xmin>,"ymin":<ymin>,"xmax":<xmax>,"ymax":<ymax>,"srs":<srscode>}},
            {"name":<layername>,"type":<layertype>,"srs":<srscode>,"extent":{"xmin":<xmin>,"ymin":<ymin>,"xmax":<xmax>,"ymax":<ymax>,"srs":<srscode>}}
        ]
    }
    "operations":[
        {"name":<operation Name>,"url":<Server-URL/operation>}
        {"name":<operation Name>,"url":<Server-URL/operation>}
    ]
}

    JSON格式返回值示例 :

{
    "serviceName":"china",
    "serverType":"MapServer",
    "serverDescription":"示例地图服务",
    "capabilities":{
        "srs":"EPSG:4326",
        "keywordlist":"NewMapServer4,MapServer",
        "fees":"none"
    },
    "mapObject":{
        "name":"中国400万示例数据",
        "srs":"EPSG:4326",
        "extent":{
            "xmin":"73.446960",
            "ymin":"3.408477",
            "xmax":"135.085831",
            "ymax":"53.557926",
            "srs":"EPSG:4326"
        },
        "layers":[
{"name":"首都和省级行政中心","url":"http://127.0.0.1:8099/newmap/rest/services/samples/china/MapServer/首都和省级行政中心","type":"LayerType_Label_Static","srs":"EPSG:4326","extent":{"xmin":"73.446960","ymin":"3.408477","xmax":"135.085831","ymax":"53.557926"}},
{"name":"国界与省界","url":"http://127.0.0.1:8099/newmap/rest/services/samples/china/MapServer/国界与省界","type":"LayerType_Label_Static","srs":"EPSG:4326","extent":{"xmin":"73.446960","ymin":"3.408477","xmax":"135.085831","ymax":"53.557926"}}]
    }
    "operations":[
{"name":"capabilities","url":"http://127.0.0.1:8099/newmap/rest/services/samples/china/MapServer/capabilities"},
{"name":"map","url":"http://127.0.0.1:8099/newmap/rest/services/samples/china/MapServer/map"}
        ]
  }