®™SSS MapServer Server-side API
Specification
Page 1 of 10© Cambridge Silicon Radio Limited This material is subject to CSR’s non-disclosure agreement www.csr.com
Document HistoryRevision Date History
1 5 MAY 11 Created in SiRF Template
2 8 SEPT Created in CSR Template. Latest API updated.
ContactsGeneral information www.csr.com
Information on this product [email protected]
Customer support for this product www.csrsupport.com
More detail on compliance and standards [email protected]
Help with this document [email protected]
Page 2 of 10© Cambridge Silicon Radio Limited This material is subject to CSR’s non-disclosure agreement www.csr.com
Trademarks, Patents and LicencesUnless 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.
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 ComplianceCSR’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 ConformanceRefer to www.csrsupport.com for compliance and conformance to standards information.
Page 3 of 10© Cambridge Silicon Radio Limited This material is subject to CSR’s non-disclosure agreement www.csr.com
ContentsDocument 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
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..........................................................................................................5
2.2. Register Service Accessor for multiple service ids.....................................................................................................5
Document References..............................................................................................................................................................7
Terms and Definitions...............................................................................................................................................................8
Page 4 of 10© Cambridge Silicon Radio Limited This material is subject to CSR’s non-disclosure agreement www.csr.com
1. Purpose and Scope
1.1. PurposeThis 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. ScopeThe document is intended as an aid for using the SiRF Studio Server MapServer API offering.
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 This material is subject to CSR’s non-disclosure agreement www.csr.com
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
2. Routing API
2.1. Get pre-defined named routes
2.2. Get shortest route
2.3. Save named routes
3. Query API
3.1. Query map-layers using attribute-filter and/or geometry-filter
3.2. Query the bounds of map-layers based on attribute-filter and/or geometry-filter
2.1. Directory Reference
MapServer Handler <MapServer-Virtual-Directory/MapServerHandler.ashxThis 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 This material is subject to CSR’s non-disclosure agreement www.csr.com
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.
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 layer-display parameters
{MapName: ‘SiRFMap’,LayerNameList: [‘City_depot’, ‘City_BusStop’, ‘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 DescriptionMapName 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
Page 7 of 10© Cambridge Silicon Radio Limited This material is subject to CSR’s non-disclosure agreement www.csr.com
indicates whether points in a layer should be connected by 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.
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 This material is subject to CSR’s non-disclosure agreement www.csr.com
Document ReferencesDocument 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 [email protected].
Page 9 of 10© Cambridge Silicon Radio Limited This material is subject to CSR’s non-disclosure agreement www.csr.com
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
Page 10 of 10© Cambridge Silicon Radio Limited This material is subject to CSR’s non-disclosure agreement www.csr.com