map serverinstallation1.5.1

46
Product ® SSS MapServer Installation User Guide Draft 1.0 Page 1 of 46 © Cambridge Silicon Radio Limited 2011 CS-nnnnnn-SPP1x This material is subject to CSR’s non-disclosure agreement www.csr.com

Upload: neelima-kapoor

Post on 07-Nov-2014

394 views

Category:

Education


1 download

DESCRIPTION

Neelima

TRANSCRIPT

Page 1: Map serverinstallation1.5.1

®™SSS MapServer Installation

User Guide

Page 1 of 38© Cambridge Silicon Radio Limited This material is subject to CSR’s non-disclosure agreement www.csr.com

Page 2: Map serverinstallation1.5.1

Document HistoryRevision Date History

1 1 Aug 2011 Created in SiRF Template

2 20 SEPT Created in CSR Template. Updated latest changes.

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 38© Cambridge Silicon Radio Limited This material is subject to CSR’s non-disclosure agreement www.csr.com

Page 3: Map serverinstallation1.5.1

Trademarks, Patents and LicencesUnless otherwise stated, words and logos marked with ™ or ® are trademarks registered or owned by CSR plc and/or its affiliates.

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 38© Cambridge Silicon Radio Limited This material is subject to CSR’s non-disclosure agreement www.csr.com

Page 4: Map serverinstallation1.5.1

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

1.3. Abbreviations and Acronyms definition....................................................................................................................5

2. MapServer Server-side API Installation.............................................................................................................................6

2.1. MapDotNet Installation............................................................................................................................................6

2.2. API Installation..........................................................................................................................................................6

2.3. Directory Reference..................................................................................................................................................7

2.4. MapServer's config file..............................................................................................................................................7

2.5. Map-files Configuration............................................................................................................................................8

2.5.2. Configure map-config file..................................................................................................................................8

2.5.3. Configure map file without MapDotNet............................................................................................................9

2.5.4. Configure map-file using MapDotNet..............................................................................................................14

2.6. Tile-Cache Configuration.........................................................................................................................................29

2.6.1. Configuring Tile-Cache Path............................................................................................................................29

2.6.2. Setting up Tile-Cache on IIS.............................................................................................................................29

3. MapServer Client-side Installation..................................................................................................................................36

3.1. OpenLayers.............................................................................................................................................................36

3.2. Mapstraction...........................................................................................................................................................36

3.3. sirfrequest...............................................................................................................................................................36

Document References............................................................................................................................................................37

Terms and Definitions.............................................................................................................................................................38

Page 4 of 38© Cambridge Silicon Radio Limited This material is subject to CSR’s non-disclosure agreement www.csr.com

Page 5: Map serverinstallation1.5.1

1. Purpose and Scope

1.1. PurposeThis guide briefly describes and illustrates how to install and configure the SSS MapServer software. This involves installation of client-side side as well as server-side API.

1.2. ScopeThe document is intended as an aid for installing the SSS MapServer API offering.

1.3. Abbreviations and Acronyms definition

Acronym Definition

HTTP Hyper Text Transfer Protocol

SSS SiRF Studio Server

URL Uniform Resource Locator

API Application Programming Interface

JS JavaScript

MDN MapDotNet

Page 5 of 38© Cambridge Silicon Radio Limited This material is subject to CSR’s non-disclosure agreement www.csr.com

Page 6: Map serverinstallation1.5.1

2. MapServer Server-side API Installation

SSS MapServer comprises of two types of API, server-side and client-side. Server-side API has been developed using .NET framework. The Server-side API methods are exposed through a .NET HTTP Handler, which can be either called through JavaScript using the MapServer Client-side API (recommended) or directly using a direct server-to-server call. The server-side and client-side API may or may not be installed on the same machine.

Server-side API comprises of the following components:

MapDotNet (Optional)

MapServer Server-side API

Tile-cache

MapServer has the following dependencies:

SSS License Manager: Installation instructions for this component are out-of-scope of this document.

SSS Security Server: Installation instructions for this component are out-of-scope of this document.

Map-data: Installation of map-data is done through GA installation.

Please note: All latest mapserver material is available in Perforce at //sirfstudio/server/ssrelease/dimts1.0/mapserver, hereby referred as <MapServerPath>.

2.1. MapDotNet Installation1. Copy MapDotNet installer available at <MapServerPath>/ releases/SSS-MapServer-1.5.0.0.0 /MDNUX

Setup_7.exe to your map-server. Also copy rmsi-carto in case of DIMTS application.

2. Install MapDotNet using this installer on the mapserver-machine. By default it gets installed in ‘C:/Program Files/MapDotNet’ folder.

2.2. API Installation3. Go to Add/Remove Programs in Control Panel and uninstall the previous version of

SirfStudioMapServer1.5.1 from your machine (if any).

4. Make sure that all files are removed from the folder ‘C: /inetpub/wwwroot/SiRFStudioMapServer1.5.1’ folder. If not, then remove them manually.

5. Copy mapserver’s web service installer from <MapServerPath>/ releases/SSS-MapServer-1.5.1.0.0 /SiRFStudioMapServer 1.5.1.rar to your map-server

6. Run the installer on the mapserver-machine. The API gets installed in ‘C: /inetpub/wwwroot/SiRFStudioMapServer1.5.1’ folder by default. Give R/W rights to IIS user on this folder. The contents of this folder are described in the next section.

Page 6 of 38© Cambridge Silicon Radio Limited This material is subject to CSR’s non-disclosure agreement www.csr.com

Page 7: Map serverinstallation1.5.1

2.3. Directory ReferenceMapServer 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/

2.4. MapServer's config file1. Go to the mapserver's directory and open web.config file.

2. Verify the parameter-values in appsettings section, and change if felt necessary. Details are given below:

Parameter Default Value Description

LicenseManagerHostWithPort maps License manager pathDefaultMapName SiRFMap Default name of map-fileAccessControlAllowOrigin * Policy for access-control

Page 7 of 38© Cambridge Silicon Radio Limited This material is subject to CSR’s non-disclosure agreement www.csr.com

Page 8: Map serverinstallation1.5.1

2.5. Map-files Configuration

What are Maps

Map data is stored in database tables. Data-source information of about map-data, along with its display settings is stored in map-files. Map-file is an assortment of layers, each pointing to a separate database table. Different applications can use same or different map-files. One application can use single or multiple map-files.

Types of Map-files

There are two options available for creating map-files.

1. Map-files are created using MapDotNet UX Studio software. Refer section Configure map-files using MapDotNet.

2. In case MapDotNet is not being used, then XML-based map-files can be created. Sample map-files are available in the MapServer's maps directory. Refer section Configure map-files without MapDotNet.

In addition each map-file has an associated config file, for storing configuration parameters specific to the map-file. Sample config-files are available in the MapServer's maps directory. Refer section Configure map-config file.

2.5.2. Configure map-config file

1. Go to the mapserver's maps directory and open the config file with same name as the application's map-file. E.g.: If map-file name is 'SiRFMap.xml', then config-file name is 'SiRFMap.config.xml'.

2. Verify the values listed under 'Parameters' node this file, and change if felt necessary. Details are given below:

Parameter Default Value Description

ViaPointRadius 0.0006 Default route to via-point distance stored in config file.

StoppageToRouteDistance 0.0009 Radius around a stoppage in which nearest street-segment can be located.

AllRoadTypes 1.2,4,8 Comma-separated list of all road-types in street-network table.

StreetLayerName Street_Network Default name for street-network layer.

RouteLayerName City_Named_Route Default name for named-route layer.

RouteStoppageLayerName City_Named_Route_BusStops Default name for named-route stoppage layer.

StoppageLayerName City_BusStop Default name for stoppage layer.BoundaryCoords 76.8384,28.408,77.498,28.8795 Comma-separated boudns of a

dynamic-layer-image.ImageDpi 96 Default DPI of a dynamic-layer-

image.

Page 8 of 38© Cambridge Silicon Radio Limited This material is subject to CSR’s non-disclosure agreement www.csr.com

Page 9: Map serverinstallation1.5.1

ImageFormat PNG Default format of a dynamic-layer-image.

ImageHeight 800ImageWidth 1000HistoryLayerName City_HistoryHistoryQuery select {1} from {0} T1 JOIN

(select min(timestamp) MinTime, max(timestamp) MaxTime from {0} where {2} and lon between {3} and {4} and lat between {5} and {6}) T2 On {2} and timestamp between MinTime and MaxTime order by timeStamp asc;

PointRadius 0.0003MaxRowsForQuery 200ReverseGCLayerNames City_Poi|City_Search_Road_Network|City_LocalityReverseGCFieldNames Poi_Nme as POI|Road_Nme as Road,FOW_NME as

Road_Type|Loc_Nme as LocalityReverseGCRadius 0.0006PoiLayerName City_PoiPoiCategoryField FTR_CRYPoiNameField POI_NMEPoiOutputFields POI_NME as Name,FTR_CRY as Type,[DESC] as

Description,CITY_NME as City,STT_NME as State,geom

2.5.3. Configure map file without MapDotNet

A map-file is alternative way for storing the layer settings for query, map-display and routing using mapserver. These map-files are used when you do not have a licensed copy of MapDotNet software. In case of DIMTS, such map-files are only used for displaying History layer.

2.5.3.1. Sample Map-files

Note: Map-files SiRFMap.xml, SiRFMap_SQL.xml and SiRFMap_PostGre.xml are available by default. SiRFMap.xml and SiRFMap_SQL are configured for SQL Server and SirFMap_PostGre is configured for PostGRE database. User can use one of these map-files or may create his own map-file. By default SiRFMap.xml is used.

2.5.3.2. Map-file Contents

Each map-layer is available under a separate node, where node-name is same as layer-name. Each layer-node has 2 sections:

1. DataSource: Description about layer-data, including connection-details, table-Name, column-names, geometry-type etc.

2. DisplaySettings: Display settings for dynamically displaying a layer as image.

DefaultStyle: Default layer-display settings

Page 9 of 38© Cambridge Silicon Radio Limited This material is subject to CSR’s non-disclosure agreement www.csr.com

Page 10: Map serverinstallation1.5.1

MarkerStyle: Style for displaying point and multipoint features

PolyStyle: Style for displaying polygon and multi-polygon features

LineStyle: Style for displaying line and multiline features

StyleClasses: Layer-data can be classified into subsets by providing a where-clause parameter. Each subset can have different display settings. All layer-features which do not belong to any style-subset will be displayed with default-style.

StyleClass

WhereClause: WhereClause for filtering data for this style

MarkerStyle

PolyStyle

LineStyle

Description of all nodes in a layer is given below:

ParentNode Sub-Node Description

DataSource

* Mandatory **Mandatory if geom-filter is used in query or layer is be displayed as a dynamic-layer

ConnectionString * Encrypted connection string. Refer next section on how to create encrypted connection-strings for your MapServer.

ConnectionType * Database type identifier. Currently supported types are sqlserver, postgre, mysql,

TableName * Name of table containing layer-dataWhereClause Default where clause to filter layer-data.OutputFields Default fields to return in case a query is

executed on this layer.SortBy Default field to be used for sorting the

query results.GeomType** Type of geometry stored in this layer.

Possible values are point, line, polygon, multi-point, multi-line, multi-polygon.

GeomField ** Name of field containing geometry data.GeomIndex ** Name of index for geometry fieldSrid ** Projection System in which layer-

geometry is stored. Default value is 4326 (Lat/long – WGS84)

DisplaySettings

** Mandatory if layer is be displayed as a dynamic-layer

MinScale Minimum scale at which layer will start getting displayed

MaxScale Maximum scale beyond which layer will not be displayed.

DetailsScale Minimum scale at which layer-details (label and centroid) will be visible.

LabelField Name of field storing layer-data labels.ShowDirection If this parameter is true and if layer

contains points or multipoints, then each point will be sequentially connected by a connector. Display settings for connector will be picked from LineStyle node.

ShowCentroid If this parameter is true and if geometry-type is line or polygon, then a marker will

Page 10 of 38© Cambridge Silicon Radio Limited This material is subject to CSR’s non-disclosure agreement www.csr.com

Page 11: Map serverinstallation1.5.1

be shown at the centroid of each layer-feature.

DisplaySettings/ DefaultStyle/ MarkerStyle

ImageUrl URL containing marker-image. Path is relative to webservice path.

ImageWidth Marker height. Default is 12.ImageWidth Marker width. Default is 12.Bearing Bearing/ angle at which marker is placed.

Default is 0.DisplaySettings/ DefaultStyle/ FontStyle

FontFamily Font family used to display layer-labels. Default is Arial

EmSize Font-size. Default is 14.FontWeight Font weight. Possible values are black,

bold, demibold, extrablack, extrabold, extralight, heavy, light, medium, normal, regular, semibold, thin, ultrablack, ultrabold, ultralight. Default is Normal.

FontStyle Normal, Italic, Oblique. Default is NormalFontColor Font-color. Default is black.FontColorOpacity Opacity of font text. Value ranges from 0

to 1. Default is 1.BgColor Optional font-background color.BgOpacity Font background opacity.BgOutlineWidth Font background outline-width.BgOutlineColor Font background outline-width.BgOutlineStyle Font backgrounds outline stroke-style.BgOutlineOpacity Font backgrounds outline stroke-opacity.MinLabelSpacing Min spacing between 2 labels.OffsetX Label will be placed at X-Offset distance

from the feature-centroid.OffsetY Label will be placed at Y-Offset distance

from the feature-centroid.Bearing Label will be placed at the given angle.LabelPosition Position of label w.r.t. centroid.

DisplaySettings/ DefaultStyle/ LineStyle

StrokeColor Color for line-features.StrokeWidth Line-widthLineJoin Style used for joining line-segments of a

line-feature. Possible values are Bevel, Miter, and Round. Default value is Miter.

LineCap Style used for displaying caps (ends) of line-segments of a line-feature. Possible values are Flat, Round, Square, and Rectangle. Default value is Flat.

StrokeOpacity Opacity at which line-feature is drawn. Value ranges from 0 to 1.

StrokeStyle LineStyle used for displaying line-feature. Possible values are:0: Solid line2 1: Repeated pattern containing two dashes and 1 gap2 2: Two dashes and two gaps4 4: Four dashes and four gaps2 3: Two dashes and three gaps1 1 3 1: One dash, one gap, 3 dashes, 1

Page 11 of 38© Cambridge Silicon Radio Limited This material is subject to CSR’s non-disclosure agreement www.csr.com

Page 12: Map serverinstallation1.5.1

gap4 2 2 32 1 1 2

DisplaySettings/ DefaultStyle/ PolyStyle

FillColor Color used for filling polygon-features.FillOpacity Opacity at which polygons will be filled.StrokeColor Color for outlining polygon-features.StrokeWidth Outline-widthLineJoin Style used for joining line-segments of a

polygon-outline. Possible values are Bevel, Miter, and Round. Default value is Miter.

LineCap Style used for displaying caps (ends) of line-segments of a polygon-outline. Possible values are Flat, Round, Square, and Rectangle. Default value is Flat.

StrokeOpacity Opacity at which polygon-outline is drawn. Value ranges from 0 to 1.

StrokeStyle LineStyle used for displaying polygon-outline. Possible values are:0: Solid line2 1: Repeated pattern containing two dashes and 1 gap2 2: Two dashes and two gaps4 4: Four dashes and four gaps2 3: Two dashes and three gaps1 1 3 1: One dash, one gap, 3 dashes, 1 gap4 2 2 32 1 1 2

DisplaySettings/ StyleClasses/StyleClass

WhereClause Whereclause for filtering a subset of layer-data

MarkerStyle Style used for rendering point-features of a layer

LineStyle Style used for rendering line-features of a layer

PolyStyle Style used for rendering polygon-features of a layer

Page 12 of 38© Cambridge Silicon Radio Limited This material is subject to CSR’s non-disclosure agreement www.csr.com

Page 13: Map serverinstallation1.5.1

2.5.3.3. Create Encrypted Connection String

1. Go to MapServer's maps directory and open GenerateConnectionString.exe.

2. Type database connection parameters. Select appropriate Connection Type and click on 'Get Connection String'. This will create an encrypted connection string.

3. Open your map-file and replace this encrypted connection-string.

Page 13 of 38© Cambridge Silicon Radio Limited This material is subject to CSR’s non-disclosure agreement www.csr.com

Page 14: Map serverinstallation1.5.1

2.5.4. Configure map-file using MapDotNet

Follow these steps, only if you plan to use MapServer along with a licensed copy of MapDotNet software, else refer previous section. In case of DIMTS, MapServer is used along with MapDotNet.

2.5.4.1. Opening Map

For map design and configuration, you need to launch MapDotNet UX Studio.

Now you are ready to begin designing maps. To open AVL map, add the mapserver server path by clicking on ‘Add’ button next to the Server Explorer dropdown. For live environment, mapserver is available at http://210.7.74.182/MapDotNetServerUX7.1.

Next, you will be able to see map named ‘rmsi_carto’ among the list of maps. You may expand this map to see the list of layers existing in AVL map.

Page 14 of 38© Cambridge Silicon Radio Limited This material is subject to CSR’s non-disclosure agreement www.csr.com

Page 15: Map serverinstallation1.5.1

In case you are not able to see rmsi_carto then you can import it using Tools> ImportMap. Here provide the path where you have copied rmsi_carto. Provide map name as rmsi_carto.

2.5.4.2. Adding Data Sources

Next, click on Add Data Source icon located in the Data Sources section, on the bottom-left. Further, specify the database connection parameters.

Page 15 of 38© Cambridge Silicon Radio Limited This material is subject to CSR’s non-disclosure agreement www.csr.com

Page 16: Map serverinstallation1.5.1

2.5.4.3. Adding Layers

To add a data layer, first select ‘rmsi_carto’ map in the Maps pane.

Right-click the map and select Add Layer. In the Add Layer dialogue, name your layer and select the data source and table name.

Finally, you may have to specify the spatial reference system (SRS), which is WGS 84.

On the rare occasion that Studio can't determine the layer geometry type, you will be prompted to select it. Here is a list of the geometry types supported by MapDotNet UX.

Point Data

The simplest of vector geometry types, point data defines the x-y locations of small, disconnected features. It is important to note, however, that the size of a feature is relative to scale. A city, for instance, might be considered a small feature best represented as a point when working with a statewide or national dataset.

Polyline Data

Line data defines collections of connected x-y points. The more points used, the more detailed the resulting line. The shape and location of both long, narrow features (roads) and long features with no area (political boundaries) are represented by lines.

Polygon Data

Polygon data defines fully-enclosed, homogeneous areas. A polygon is a series of connected lines comprised of individual x-y points. The shape and location of features such as counties, school zones, property parcels, zoning regions, census tracts, etc. are represented by polygons.

Page 16 of 38© Cambridge Silicon Radio Limited This material is subject to CSR’s non-disclosure agreement www.csr.com

Page 17: Map serverinstallation1.5.1

2.5.4.4. Editing Layer Properties

After the layer is added, Studio will prompt users to specify layer properties.

Else you can select an existing layer from the maps pane, and click on Modify Layer option.

General Layer Properties

There are two tabs available when setting layer properties. You will first see the General tab and can click on the Classifications tab for greater control over the symbolization of your spatial data.

Data Source and Geometry Column

If you need to change the data source, click the plus sign next to it. A new connection string must always be provided, even to the same data provider. The Geometry Column is inferred from the data source.

Classification Column

Data should be classified if you want features to be rendered differently based on attribute values. The first step in classifying data in MapDotNet UX Studio is specifying a classification column. When you click on the Classification Column dropdown, the corresponding table's column names will be displayed.

One table may contain several attributes appropriate for classification. In order to classify two columns from the same table, simply add two map layers (different layer names, same source table) and select different classification columns.

For example, you wish to show City_Highway in different colors based on the cities they are located in. In that case select the CITY column.

Page 17 of 38© Cambridge Silicon Radio Limited This material is subject to CSR’s non-disclosure agreement www.csr.com

Page 18: Map serverinstallation1.5.1

Label Column

Some tables will include columns conducive for labeling geographic features. If such a column exists, select the appropriate Label Column from the dropdown, check and expand the Optional Label box and set labeling options.

For example, if you wish to name of roads along with each city highway. In that case, select the ROAD_NME column as label column.

LineColorColumn and FillColorColumn

Set these to specify columns used to set line or fill colors from data. The column may be a string column with hexadecimal values preceded by "#", or the column may be an integer column. The use of these is optional and currently not in use.

Visible

Data may or may not require visualization on your map. Uncheck the Visible option to turn symbolization off. Data can be queried regardless of visibility.

Where Clause

Complete the Where Clause box in order to filter data tables. Provide a suitable SQL where clause. Do not include the WHERE keyword.

For example, you wish to show all highways, whose name starts from ‘NH’. In that case, set the whereclause as ROAD_NME like ‘NH%’.

Page 18 of 38© Cambridge Silicon Radio Limited This material is subject to CSR’s non-disclosure agreement www.csr.com

Page 19: Map serverinstallation1.5.1

For shapefile and KML data sources only, the where clause is restricted. Only <, <=, =, >=, and != are supported. Each expression must have a column name on one side and a value on the other. Expressions may only be joined with AND. For KML, Folder can be used as a filter. Folder = '/Polygons' will return only data directly in the /Polygons folder, not in /Polygons/Buildings. Use the * wildcard to include subfolders. Folder = '/Polygons/*' will return data from both /Polygons and /Polygons/Buildings

SRS

Use this to change the Spatial Reference System, if necessary. Since this must be the actual SRS for the data, you would only do this if it was originally entered incorrectly or you have changed the data source. Currently layers are using WGS 84.

Metadata

Use this to attach arbitrary key-value pairs to the layer for use in your applications. The Identify, Drilldown, and Query examples in our interactive SDK demonstrate this. Note that after adding or editing a metadata item, you must always click the check mark icon for the edit to be recognized.

Styles, Labels, and Markers

The editors for default rendering are on the right side of the general tab. At the top will be a panel for Point Style, Polyline Style, or Polygon Style. There will be a panel for "Optional Label", but it will only be enabled if a LabelColumn has been selected. Polyline and Polygon layers will have a panel for "Optional Marker". For further information, see the “Editing Layer Styles’ section.

Page 19 of 38© Cambridge Silicon Radio Limited This material is subject to CSR’s non-disclosure agreement www.csr.com

Page 20: Map serverinstallation1.5.1

Scale-based Display and Layer Classification

This section enables you to provide different display settings for different column values. Also you can define scale groups and symbolize the classifications contained within each scale group.

After specifying a classification column on the General Tab, use the controls on the Classifications Tab to define scale groups and symbolize the classifications contained within each scale group. It is important to use scale groups when symbolizing maps for applications in which users can zoom in and out. Line and point features (and polygon strokes) should be less prominent and less opaque at 1:500000 than at 1:25000.

Add new scale groups by clicking the New Scale Group button and setting minimum and maximum scale values. Right-click scale groups to copy them, remove them, or set a limited set of properties across all classifications in the group.

To add classifications to a scale group, select the scale group in the Scale Groups pane then click the New Classification button in the Classifications panel.

Page 20 of 38© Cambridge Silicon Radio Limited This material is subject to CSR’s non-disclosure agreement www.csr.com

Page 21: Map serverinstallation1.5.1

Classification Types

Below the scale group is a dropdown to select the type of classifications the group will contain.

All: The default classification type, selecting all will cause all features to be symbolized same way at any given scale group.

Exact: Selecting exact will allow each value in the classification column to be distinctly symbolized any given scale group. Add a classification for each value to be symbolized.

Range: Selecting range will allow ranges of values to be specified at any given scale group. Add a classification for each range to be symbolized.

For both Exact and Range classifications, you must select a Classification Column under the General tab. When "Exact" or "Range" is selected, the "Change Color Scheme" button will be enabled. Use this after you have set up all the classifications for the scale group. It will let you select a set of colors to apply to the group.

If there is more than one classification under a scale group, you can right-click classifications to remove or re-order them. Classifications are rendered in the order they are listed, which you can use to create composite rendering. For instance, a classification that draws a wide black line can be followed by one that draws a narrower white line to create the appearance of a bordered line.

Clicking a Classification brings up classification property and style panels. Note that the style is displayed above the properties. For styles, see Style Editors.

ID

The class ID is used to reference the class in calls to MapService.GetLegendIcon. See the legend example in our interactive SDK for an example of class IDs being used in this way.

Usually IDs should be unique within a scale group. However, if a set of classifications are being used to create a composite rendering, they should all have the same ID.

When map changes are applied, Studio will generate unique IDs for any classifications for which an ID has not been set.

Use layer line and fill columns when set. Check or uncheck this to indicate whether this class should recognize FillColorColumn and LineColorColumn settings for the layer.

MetadataUse this to attach arbitrary key-value pairs to the classification for use in your applications.

Page 21 of 38© Cambridge Silicon Radio Limited This material is subject to CSR’s non-disclosure agreement www.csr.com

Page 22: Map serverinstallation1.5.1

Editing Layer Styles

Style editors are found in both the layer and classification editing screens. Layers provide default style properties that apply across all classifications except where a classification overrides it with a different setting.

There are five style editors used by Studio. Sometimes the appearance of an editor will be slightly different under the layer's General tab than under a classification.

Note that classifications inherit styles from their parent layer. In a classification style editor, a round button next to a property indicates that the property is changed from the layer's default value. Click the button to revert to the default.

One thing all style editors have in common is that a depiction of the style rendering is displayed somewhere to the left of the style editor. Where multiple editors apply, the rendering will be a composite.

Which style editors are available will depend on the type of layer. Available editors are:

Polygon Style

Polyline Style

Point Style

Optional Label

Optional Marker

Page 22 of 38© Cambridge Silicon Radio Limited This material is subject to CSR’s non-disclosure agreement www.csr.com

Page 23: Map serverinstallation1.5.1

Additionally, there are two sub-editors used by these.

Brush Selector

Symbol Selector

Polygon Style

The polygon style editor is used for defining the fill and stroke (outline) to use for polygon features.

The Fill and Stroke inputs both use the Brush Selector when the bucket icon is clicked. A thumbnail shows the current fill or stroke. When the fill or stroke is solid, the color value is displayed next to the thumbnail. When the fill or stroke is a pattern, the word "drawing" is displayed. The slider below this text sets opacity.

Several additional inputs further modify the stroke. Stroke thickness is the line width, line join affects how corners are rendered, and stroke style allows you to select dash patterns.

Polyline Style

The polyline style editor is used for defining the stroke to use for polyline features.

The Stroke input uses the Brush Selector when the bucket icon is clicked. A thumbnail shows the current stroke. When the stroke is solid, the color value is displayed next to the thumbnail. When the stroke is a pattern, the word "drawing" is displayed. The slider below this text sets opacity.

Several additional inputs further modify the stroke. Stroke thickness is the line width, line join affects how corners are rendered, and stroke style allows you to select dash patterns.

For example, if you need to modify the width of City_Highway road, you need to modify the Stroke thickness value.

This configuration can be done for different scales as shown below.

Page 23 of 38© Cambridge Silicon Radio Limited This material is subject to CSR’s non-disclosure agreement www.csr.com

Page 24: Map serverinstallation1.5.1

Point Style

The point style editor is used for defining the symbol to use for point features. Note that the preview for this editor will display crosshairs used to indicate where the symbol is in relation to the data point.

The Symbol input uses the Symbol Selector when the grid icon is clicked. Symbols are XAML constructs, and the pencil icon copies the XAML to the clipboard.

Width and Height size the symbol. Offset X and Offset Y move it relative to the data point- the default is to center the symbol on the data point. Angle rotates the symbol. Opacity allows you to make the symbol translucent.

Optional Label

The Optional Label editor is used for applying text labels to features. It is only available when a layer has a LabelColumn selected.

Labeling is tricky when performing tile-based rendering. You will find that maps that use labels need quite large Bleed Ratio settings to avoid rendering problems at the edges of tiles.

Label PropertiesFont, Size, Font Color, FontStyle, FontWeightThese set the properties of the text itself. Size is the em-size.

Page 24 of 38© Cambridge Silicon Radio Limited This material is subject to CSR’s non-disclosure agreement www.csr.com

Page 25: Map serverinstallation1.5.1

Rotate With FeatureThis option is only shown for line layers. When it is enabled, labels bend to follow the line data. Certain other properties are ignored when Rotate With Feature is in effect, as noted below.

PositionThis is the position of the label with respect to the point being labeled. For lines this is the midpoint, for polygons the centroid. When Rotate With Feature is in effect, this is ignored and the label will be roughly centered.

OffsetX, OffsetYThis is an offset from the labeling point and is ignored when Rotate With Feature is in effect.

BackgroundThis is a brush used to fill a box behind the label. It is not recommended to use this when Rotate With Feature is in effect.

Outline, OutlineThicknessThese define a stroke to use to outline a label. This works well with Background. These are ignored when Rotate With Feature is in effect.

GlowSize, GlowOpacity, GlowColorThese define a glow effect around the text. GlowColor allows you to select only a color, not a complete brush. Glow is a better choice than Background when Rotate With Feature is in effect.

Minimum SpacingThis is a minimum spacing between labels. It essentially defines boxes around labels in which other labels may not be placed. All labels are rendered after all other features, and if two different layers or classes define different values for this, the effective minimum spacing between them is the mean of the values.

Use of this feature increases the risk of errors at tile boundaries and will require even larger bleed ratios.

Optional MarkerThis is essentially the same as the Point Style editor, but it is used with polyline or polygon layers to place a marker at line midpoints or polygon centroids.

Brush Selector

The brush selector displays a selection of brushes which are chosen by clicking on them. The fill can be chosen by clicking a preset color or using the color sliders. A thumbnail shows the resulting pattern.

Page 25 of 38© Cambridge Silicon Radio Limited This material is subject to CSR’s non-disclosure agreement www.csr.com

Page 26: Map serverinstallation1.5.1

Click "Use" once you have chosen a brush and fill to select the pattern for use.

The brush definitions are found in [MapDotNet installation folder]\Studio\General Assets\Brushes.xaml. This file may be edited as desired.

Symbol Selector

The symbol selector lets you browse the symbol library. Select a category of symbols from the dropdown, select a symbol by clicking on it, and click "Use" to select the symbol for use.

The symbol library can also be reviewed from the View menu. Select View->Symbol Library and then select a category.

By default, Studio only lets you define new symbols in the "User Defined" category. Symbols may be added to editable categories through Studio.

Page 26 of 38© Cambridge Silicon Radio Limited This material is subject to CSR’s non-disclosure agreement www.csr.com

Page 27: Map serverinstallation1.5.1

The symbol definitions are in folders under [MapDotNet installation folder]\Studio\Symbols. If you want to create a new symbol library, add a new folder and add a Library.xml file to it modeled after an existing one in one of the other folders. Add your symbol XAML files, reference them in your library file, and they will be available in your symbol selector.

Page 27 of 38© Cambridge Silicon Radio Limited This material is subject to CSR’s non-disclosure agreement www.csr.com

Page 28: Map serverinstallation1.5.1

2.5.4.5. Editing Map Properties

Add, Edit or Export

Right-click on a map name to add layers, edit map properties, or export or delete maps.

Editing Map Properties

If you right-click the map you can edit map properties. Some of the properties available on the edit screen are not exposed during the process of initially creating a new map.

TitleThe title of the map. This is read-only.

Map UnitsThe distance units used by the projection the map displays data in. This is read-only.

ProjectionThe Well Known Text (WKT) representation of the projection the map displays data in. This is read-only.

Background ColorThe background color used by the map.

Initial ExtentsThe recommended starting area for viewing this map. It is in the coordinate system of the map projection, and listed as minimum X, minimum Y, maximum X, maximum Y. This can also be set from the Map Settings Display Pane by clicking "Update Map Extents."

Minimum Bleed RatioSets the minimum amount of tile overfetching allowed for this map. This is used to prevent labels and point symbols from being clipped at the edge of tiles. The recommended value is 1.0 + ([largest dimension of largest point symbol] / 128.0). Maps with labeling will need even larger values.

MetadataUse this to attach arbitrary key-value pairs to the map for use in your applications. The Identify and Drilldown examples in our interactive SDK demonstrate this. Note that after adding or editing a metadata item, you must always click the check mark icon for the edit to be recognized.

Page 28 of 38© Cambridge Silicon Radio Limited This material is subject to CSR’s non-disclosure agreement www.csr.com

Page 29: Map serverinstallation1.5.1

2.6. Tile-Cache ConfigurationMap-tiles are used by displaying a static base-map in your application. Base-map is stored as tiles (arranged in rows and columns) on your application-server or map-server machine. To display base-map, you need to configure the path containing map-tiles.

2.6.1. Configuring Tile-Cache Path

On the server containing the map-tiles directory, create a virtual-directory on IIS called ‘tilecache’ pointing to the maptiles-directory.In case of DIMTS, map-tiles have been cached and kept in C:/inetpub/wwwroot/tilecache/dimts.

2.6.2. Setting up Tile-Cache on IIS

Follow the steps below to create a new tile-cache.

Download the windows installer for the latest version (2.5.1) of Python from here.

Run the Python installer for windows and install Python to its default location “C:\Python25\”.

Setup the Python install directory in the system environment ‘PATH’ variable. Right-click on ‘My Computer’ and select ‘Properties’. Click on the ‘Advanced’ tab. Click on the ‘Environment Variables’ button. In the ‘Environment Variables’ dialog, select ‘PATH’ from the ‘System Variables’ group.

Page 29 of 38© Cambridge Silicon Radio Limited This material is subject to CSR’s non-disclosure agreement www.csr.com

Page 30: Map serverinstallation1.5.1

Click the ‘Edit button and add your Python path (C:\Python25\) to the end of the current PATH value.

Download TileCache from here (version 2.10). Unzip its contents to ‘C:\Inetpub\wwwroot\tilecache-2.10’. This is just a location, it can obviously be setup as a virtual directory at any path desired.

Page 30 of 38© Cambridge Silicon Radio Limited This material is subject to CSR’s non-disclosure agreement www.csr.com

Page 31: Map serverinstallation1.5.1

Setup the unzipped ’tilecache’ directory as an application in IIS. Click ‘Start->Run’ and type in ‘inetmgr’ and click ok. This brings up the Internet Service Manager (ISM).

Now, we need to setup IIS to run Python scripts. Find ’tilecache’ under ‘Default Web Site’ and right-click to select properties.

Page 31 of 38© Cambridge Silicon Radio Limited This material is subject to CSR’s non-disclosure agreement www.csr.com

Page 32: Map serverinstallation1.5.1

In the ‘Directory’ tab, under the ‘Application Settings’ section, the ‘Application Name’ and its value should be disabled. Click the ‘Create’ button next to it. This should setup ’tilecache’ as the application name. Click OK to exit the dialog.

In the ISM, right-click on ‘Default Web Site’ and select ‘Properties’. Under the ‘Home Directory’ tab, select the ‘Configuration’ button.

This should bring up the ‘Application Configuration’ dialog, Click on the ‘Add’ button. This brings up the ‘Add/Edit Application Extension Mapping’ dialog. In the executable field, enter ‘C:\Python25\python.exe %s %s’. In the extension field, enter ‘.py’. Check both ‘Script engine’ and ‘Check that file exists’ options.

Page 32 of 38© Cambridge Silicon Radio Limited This material is subject to CSR’s non-disclosure agreement www.csr.com

Page 33: Map serverinstallation1.5.1

This should add a new entry for ‘.py’ in the ‘Application Configuration’ dialog.

Open up the command prompt and change directory to ‘C:\Inetpub\AdminScripts’. Execute the following:

adsutil set w3svc/AllowPathInfoForScriptMappings True

adsutil set w3svc/1/AllowPathInfoForScriptMappings True

Rename ‘C:\Inetpub\wwwroot\tilecache-2.10\tilecache.cgi’ to ‘C:\Inetpub\wwwroot\tilecache\tilecache.py’.

Edit ‘C:\Inetpub\wwwroot\tilecache-2.10\tilecache.py’ and remove the first line in it that reads ‘#!/usr/bin/env python‘. Also, change the ‘Service.Load’ parameter to ‘C:\\Inetpub\\wwwroot\\tilecache\\tilecache.cfg’ like shown within quotes.

Page 33 of 38© Cambridge Silicon Radio Limited This material is subject to CSR’s non-disclosure agreement www.csr.com

Page 34: Map serverinstallation1.5.1

Create a directory called ‘Cache’ under ‘C:\Inetpub\wwwroot\tilecache-2.10\’. This is where to generated cache will be outputted. Give write permissions to the ‘Internet Guest account’ to this directory since the cache generated will be written to this location, please do take the time to setup the security properly as per your requirements.

Edit ‘C:\Inetpub\wwwroot\tilecache-2.10\tilecache.cfg’. Change the value for ‘base’ under the ‘[Cache]‘ section to ‘C:\Inetpub\wwwroot\tilecache-2.10\Cache’, the directory where the cache will be outputted.

From

To

Also, change the ‘url’ value under the ‘[basic]‘ to the URL of the WMS service that you want to be cached. Here ‘[basic]‘ is the name of the layer you want cached. Configure it accordingly for the WMS service you are using.

These are the steps to configure TileCache on IIS.

Look in your ‘C:\Inetpub\wwwroot\tilecache-2.10\Cache’ directory as the cache is generated. You should be able to see a whole bunch directory and files being generated when browsing around.

Page 34 of 38© Cambridge Silicon Radio Limited This material is subject to CSR’s non-disclosure agreement www.csr.com

Page 35: Map serverinstallation1.5.1

We don’t want to be browsing all around the map at all scales to fully generate the cache. In order to generate the cache for the desired region automatically, a python utility script has been provided with TileCache. To run the script, open up command prompt and execute the following.

python “C:\Inetpub\wwwroot\tilecache-2.10\tilecache_seed.py” “http://localhost/tilecache-2.10/tilecache.py?” DelhiBaseMap 0 2

This generates the cache for the basic layer between scales 0 and 2. Please be aware that as you start increasing the scale range (0 to 6 etc), the time required to generate the cache will exponentially increase.

Page 35 of 38© Cambridge Silicon Radio Limited This material is subject to CSR’s non-disclosure agreement www.csr.com

Page 36: Map serverinstallation1.5.1

3. MapServer Client-side Installation

MapServer Client-side API is installed in your web-application folder. This API comprises of the following java-script files, which will be further interacting with the MapServer server-side API.

1. OpenLayers.js and associated files

2. mapstraction.js

3. sirfequest.js

MapServer has the following dependencies:

SSS License Manager: Installation instructions for this component are out-of-scope of this document.

SSS Security Server: Installation instructions for this component are out-of-scope of this document.

Map-data: Installation of map-data is done through GA installation.

3.1. OpenLayers1. Extract OpenLayers 2.8 API files from <MapServerPath>/releases/SSS-MapServer-1.5.0.0.0 /OpenLayers-

2.8.zip.

2. Extract these files and copy them to a sub-folder of your web-application.

3. Replace OpenLayers.js in the above sub-folder with the one available in <MapServerPath>/mapstraction folder.

3.2. Mapstraction1. Copy latest mapstraction.js and mapstraction.config.js from <MapServerPath>/mapstraction folder to the

same directory in which you have placed OpenLayers API.

2. Update server-paths in mapstraction.config.js.

tileCachePath: URL containing the the base-map-tilecache. If your web-application doesn’t have its own tile-cache and instead uses a third-party base-map from Google, Bing etc, then this configuration can be avoided.

mapServerPathForWms: URL of web-service handling WMS-requests for dynamic layers (http://<MapServerMachine>/SiRFStudioMapServer1.5.1/MapServerHandler.ashx)

defaultMapName: Default map-file name used by your web-application

3.3. sirfrequest1. Copy latest sirfrequest.js from //sirfstudio/server/ssrelease/dimts1.0/cross_domain_api folder in Perforce

to the same directory in which you have placed mapstraction.js.

2. Update following paths in sirfrequest.js.

urlRouter: Location of Security Server. Ask SiRFStudio MapServer team for assistance.

proxyPath: Location of proxy page. Ask SiRFStudio MapServer team for assistance.

Page 36 of 38© Cambridge Silicon Radio Limited This material is subject to CSR’s non-disclosure agreement www.csr.com

Page 37: Map serverinstallation1.5.1

Document ReferencesDocument Reference

SiRF Studio Product Requirements Definition, Revision 1.0 02/20/2007 <Cognidox Ref>

Please add feedback on these documents in Cognidox or by emailing [email protected].

Page 37 of 38© Cambridge Silicon Radio Limited This material is subject to CSR’s non-disclosure agreement www.csr.com

Page 38: Map serverinstallation1.5.1

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 38 of 38© Cambridge Silicon Radio Limited This material is subject to CSR’s non-disclosure agreement www.csr.com