Más contenido relacionado Similar a Csr template (20) Csr template1. ®
Product ™
SSS MapServer Server-side API
Specification
Draft 1.0
Page 1 of 10
© Cambridge Silicon Radio Limited 2011 CS-nnnnnn-SPP1x
This material is subject to CSR’s non-disclosure agreement www.csr.com
2. Document History
Revision Date History
1 5 MAY 11 Created in SiRF Template
2 8 SEPT Created in CSR Template. Latest API updated.
Contacts
Product SSS MapServer Server-side API Specification
General information www.csr.com
Information on this product sales@csr.com
Customer support for this product www.csrsupport.com
More detail on compliance and standards product.compliance@csr.com
Help with this document comments@csr.com
Page 2 of 10
© Cambridge Silicon Radio Limited 2011 CS-nnnnnn-SPP1x
This material is subject to CSR’s non-disclosure agreement www.csr.com
3. Trademarks, Patents and Licences
Unless otherwise stated, words and logos marked with ™ or ® are trademarks registered or owned by CSR plc and/or its
affiliates.
Select appropriate sentences based on product range from this list
Other products, services and names used in this document may have been trademarked by their respective owners.
The publication of this information does not imply that any licence is granted under any patent or other rights owned by
CSR plc or its affiliates.
CSR reserves the right to make technical changes to its products as part of its development programme.
Product SSS MapServer Server-side API Specification
While every care has been taken to ensure the accuracy of the contents of this document, CSR cannot accept responsibility
for any errors.
No statements or representations in this document are to be construed as advertising, marketing, or offering for sale in the
United States imported covered products subject to the Cease and Desist Order issued by the U.S. International Trade
Commission in its Investigation No. 337-TA-602. Such products include SiRFstarIII™ chips that operate with SiRF software
that supports SiRFInstantFix™, and/or SiRFLoc® servers, or contains SyncFreeNav functionality.
Life Support Policy and Use in Safety-critical Compliance
CSR’s products are not authorised for use in life-support or safety-critical applications. Use in such applications is done at
the sole discretion of the customer. CSR will not warrant the use of its devices in such applications.
Performance and Conformance
Refer to www.csrsupport.com for compliance and conformance to standards information.
Page 3 of 10
© Cambridge Silicon Radio Limited 2011 CS-nnnnnn-SPP1x
This material is subject to CSR’s non-disclosure agreement www.csr.com
4. Contents
Document History ...................................................................................................................................................................... 2
Contacts ..................................................................................................................................................................................... 2
Trademarks, Patents and Licences ............................................................................................................................................. 3
Life Support Policy and Use in Safety-critical Compliance ......................................................................................................... 3
Performance and Conformance ................................................................................................................................................. 3
Contents .................................................................................................................................................................................... 4
Product SSS MapServer Server-side API Specification
1. Purpose and Scope ............................................................................................................................................................ 5
1.1. Purpose ...................................................................................................................................................................... 5
1.2. Scope.......................................................................................................................................................................... 5
2. LMBinary APIs .................................................................................................................................................................... 5
2.1. Register Service Accessor for single service id ........................................................................................................... 6
2.2. Register Service Accessor for multiple service ids .......................................................Error! Bookmark not defined.
Document References ............................................................................................................................................................... 9
Terms and Definitions .............................................................................................................................................................. 10
Page 4 of 10
© Cambridge Silicon Radio Limited 2011 CS-nnnnnn-SPP1x
This material is subject to CSR’s non-disclosure agreement www.csr.com
5. 1. Purpose and Scope
1.1. Purpose
This guide briefly describes and illustrates how to use the SiRF Studio Server MapServer API by describing each API method
through method definition, parameter details and short source code snippets. It includes details of both server as well as
client-side API. In addition, this guide offers some recommended practices for the API usage. By following these practices,
the API can be utilized more efficiently and powerfully.
1.2. Scope
The document is intended as an aid for using the SiRF Studio Server MapServer API offering.
Product SSS MapServer Server-side API Specification
1.3. Abbreviations and Acronyms definition
Acronym Definition
GA GeoAgent
SS SiRF Studio
POI Point of Interest
SSS SiRF Studio Server
SE Standard Edition
URL Uniform Resource Locator
API Application Programming Interface
JS JavaScript
Page 5 of 10
© Cambridge Silicon Radio Limited 2011 CS-nnnnnn-SPP1x
This material is subject to CSR’s non-disclosure agreement www.csr.com
6. 2. MapServer Server-side API
Server-side API has been developed using .NET framework. The API methods are exposed through a .NET HTTP Handler. All
these methods can be called through JavaScript using the MapServer Client-side API. The API provides the following
functionalities.
1. Mapping API
1.1. Get dynamic map layers, including history layer
1.2. Desktop component to create and cache custom map with user-defined layer settings
Product SSS MapServer Server-side API Specification
2. Routing API
2.1. Get pre-defined named routes
2.2. Get shortest route
2.3. Save named routes
3. Query API
1.1. Query map-layers using attribute-filter and/or geometry-filter
3.1. Query the bounds of map-layers based on attribute-filter and/or geometry-filter
2.1. Directory Reference
MapServer Handler <MapServer-Virtual-Directory/MapServerHandler.ashx
This is the primary access point for all API methods.
Log files <MapServer-Virtual-Directory/logs/
Config-file <MapServer-Virtual-Directory/web.config
Map-files MapDotNet map-files can be accessed from MapDotNet Studio
(Server URI: http://localhost/MapDotNetServerUX7.1)
XML map-files can be accessed from <MapServer-Virtual-Directory/maps/
Page 6 of 10
© Cambridge Silicon Radio Limited 2011 CS-nnnnnn-SPP1x
This material is subject to CSR’s non-disclosure agreement www.csr.com
7. 2.2. Mapping API
2.2.1. Get Dynamic Layer(s)
2.2.1.1. Description
Get dynamic layer-data as an image. It queries layer-data, and returns layer-data as a binary image. Layer data-source and
display settings are read from the map. This method supports single as well as multiple layers.
Product SSS MapServer Server-side API Specification
2.2.1.2. Method Name/ Request Type
GetDynamicLayers/ GET
2.2.1.3. Request Params
This API takes input in JSON format. The JSON string contains following 2 parameters.
Parameter Type Description Sample Value
OperationName string Operation name GetDynamicLayers
LayerDisplayInput string JSON string {
containing MapName: ‘SiRFMap’,
layer-display LayerNameList: [‘City_depot’, ‘City_BusStop’,
parameters ‘City_History’],
WhereClauseList: [ “ID>2”,”UNIQ_ID=’123’”,
“USER_ID = ‘VT00001’”],
ShowDirectionList: [false, false, true],
MapExtent: {XMin: 77.22, YMin: 28.60, XMax:
77.23, YMax: 28.61},
ImageWidth: 1330,
ImageHeight: 800,
ImageDpi: 96,
ImageFormat: PNG
}
LayerDisplayInput Params:
Paramaters Type Description
MapName string Map name containing data-source and display settings for
given layer-names. This map can either be a MapDotNet map
or an XML map-file stored in MapServer maps directory.
LayerNameList [string] Array of layer-names. These layer-names are case-sensitive
and should exist in the given map.
WhereClauseList [string] (Optional) Array of where-clause to be applied to each layer-
name. If where-clause is not provided, then where-clause is
picked from map-file. If map-filter contains empty where-
clause then entire layer-data is returned.
ShowDirectionList [bool] (Optional) Array of ShowDirection status. ShowDirection
indicates whether points in a layer should be connected by
Page 7 of 10
© Cambridge Silicon Radio Limited 2011 CS-nnnnnn-SPP1x
This material is subject to CSR’s non-disclosure agreement www.csr.com
8. lines or not. This is only required for point-layers. Default
value is false.
MapExtent string (Optional) JSON string having attributes XMin, YMin, XMax,
YMax. Layer-data will only be retrieved for given mapextent.
If no mapExtent is given then it is picked from the MapServer
config file.
ImageWidth string Output image-width in pixels. Default is picked from the
MapServer config file.
ImageHeight string Output image-height in pixels. Default is picked from the
MapServer config file.
ImageDpi string (Optional) Output image-dpi. Default is picked from the
MapServer config file.
Product SSS MapServer Server-side API Specification
ImageFormat string (Optional) Output image format. Currently supported types:
PNG, JPEG, GIF. Default is picked from the MapServer config
file.
2.2.1.4. Response
Success: Byte array containing layer(s) image.
Error: Empty byte array
Page 8 of 10
© Cambridge Silicon Radio Limited 2011 CS-nnnnnn-SPP1x
This material is subject to CSR’s non-disclosure agreement www.csr.com
9. Document References
Document Reference
SiRF Studio Product Requirements Definition, Revision 1.0 02/20/2007 <Cognidox Ref>
SiRF Studio Server: GeoAgent Component Requirements Specification Document, Revision
0.3 02/07/2007
Please add feedback on these documents in Cognidox or by emailing comments@csr.com.
Product SSS MapServer Server-side API Specification
Page 9 of 10
© Cambridge Silicon Radio Limited 2011 CS-nnnnnn-SPP1x
This material is subject to CSR’s non-disclosure agreement www.csr.com
10. Terms and Definitions
BlueCore® Group term for CSR’s range of Bluetooth wireless technology chips
Bluetooth® Set of technologies providing audio and data transfer over short-range radio connections
CSR Cambridge Silicon Radio
UniFi® Group term for CSR’s range of chips designed to meet IEEE 802.11 standards
Product SSS MapServer Server-side API Specification
Page 10 of 10
© Cambridge Silicon Radio Limited 2011 CS-nnnnnn-SPP1x
This material is subject to CSR’s non-disclosure agreement www.csr.com