Map serverinstallation1.5.1

437 views

Published on

Neelima

Published in: Education, Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
437
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
74
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Map serverinstallation1.5.1

  1. 1. Product®™<br />SSS MapServer Installation<br />User Guide<br />Draft 1.0<br /> <br />Document History<br />RevisionDateHistory11 Aug 2011Created in SiRF Template220 SEPTCreated in CSR Template. Updated latest changes.<br />Contacts<br />General informationwww.csr.com<br />Information on this productsales@csr.com<br />Customer support for this productwww.csrsupport.com<br />More detail on compliance and standardsproduct.compliance@csr.com<br />Help with this documentcomments@csr.com<br />Trademarks, Patents and Licences<br />Unless otherwise stated, words and logos marked with ™ or ® are trademarks registered or owned by CSR plc and/or its affiliates.<br />Other products, services and names used in this document may have been trademarked by their respective owners.<br />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.<br />CSR reserves the right to make technical changes to its products as part of its development programme.<br />While every care has been taken to ensure the accuracy of the contents of this document, CSR cannot accept responsibility for any errors.<br />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.<br />Life Support Policy and Use in Safety-critical Compliance<br />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.<br />Performance and Conformance<br />Refer to www.csrsupport.com for compliance and conformance to standards information.<br />Contents<br /> TOC o "1-3" h z u Document History PAGEREF _Toc304363190 h 2<br />Contacts PAGEREF _Toc304363191 h 2<br />Trademarks, Patents and Licences PAGEREF _Toc304363192 h 3<br />Life Support Policy and Use in Safety-critical Compliance PAGEREF _Toc304363193 h 3<br />Performance and Conformance PAGEREF _Toc304363194 h 3<br />Contents PAGEREF _Toc304363195 h 4<br />1.Purpose and Scope PAGEREF _Toc304363196 h 5<br />1.1.Purpose PAGEREF _Toc304363197 h 5<br />1.2.Scope PAGEREF _Toc304363198 h 5<br />1.3.Abbreviations and Acronyms definition PAGEREF _Toc304363199 h 5<br />2.MapServer Server-side API Installation PAGEREF _Toc304363200 h 6<br />2.1.MapDotNet Installation PAGEREF _Toc304363201 h 6<br />2.2.API Installation PAGEREF _Toc304363202 h 6<br />2.3.Directory Reference PAGEREF _Toc304363203 h 7<br />2.4.MapServer's config file PAGEREF _Toc304363204 h 7<br />2.5.Map-files Configuration PAGEREF _Toc304363205 h 8<br />2.5.2.Configure map-config file PAGEREF _Toc304363206 h 8<br />2.5.3.Configure map file without MapDotNet PAGEREF _Toc304363207 h 9<br />2.5.4.Configure map-file using MapDotNet PAGEREF _Toc304363208 h 14<br />2.6.Tile-Cache Configuration PAGEREF _Toc304363209 h 29<br />2.6.1.Configuring Tile-Cache Path PAGEREF _Toc304363210 h 29<br />2.6.2.Setting up Tile-Cache on IIS PAGEREF _Toc304363211 h 29<br />3.MapServer Client-side Installation PAGEREF _Toc304363212 h 36<br />3.1.OpenLayers PAGEREF _Toc304363213 h 36<br />3.2.Mapstraction PAGEREF _Toc304363214 h 36<br />3.3.sirfrequest PAGEREF _Toc304363215 h 36<br />Document References PAGEREF _Toc304363216 h 37<br />Terms and Definitions PAGEREF _Toc304363217 h 38<br />Purpose and Scope<br />Purpose<br />This 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.<br />Scope<br />The document is intended as an aid for installing the SSS MapServer API offering.<br />Abbreviations and Acronyms definition<br />AcronymDefinitionHTTPHyper Text Transfer ProtocolSSSSiRF Studio ServerURLUniform Resource LocatorAPIApplication Programming InterfaceJSJavaScriptMDNMapDotNet<br />MapServer Server-side API Installation<br />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.<br />Server-side API comprises of the following components:<br />MapDotNet (Optional)<br />MapServer Server-side API<br />Tile-cache<br />MapServer has the following dependencies:<br />SSS License Manager: Installation instructions for this component are out-of-scope of this document.<br />SSS Security Server: Installation instructions for this component are out-of-scope of this document.<br />Map-data: Installation of map-data is done through GA installation.<br />Please note: All latest mapserver material is available in Perforce at //sirfstudio/server/ssrelease/dimts1.0/mapserver, hereby referred as <MapServerPath>.<br />MapDotNet Installation<br />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.<br />Install MapDotNet using this installer on the mapserver-machine. By default it gets installed in ‘C:/Program Files/MapDotNet’ folder.<br />API Installation<br />Go to Add/Remove Programs in Control Panel and uninstall the previous version of SirfStudioMapServer1.5.1 from your machine (if any). <br />Make sure that all files are removed from the folder ‘C: /inetpub/wwwroot/SiRFStudioMapServer1.5.1’ folder. If not, then remove them manually. <br />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<br />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.<br />Directory Reference<br />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-filesMapDotNet 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/<br />MapServer's config file<br />Go to the mapserver's directory and open web.config file. <br />Verify the parameter-values in appsettings section, and change if felt necessary. Details are given below:<br />ParameterDefault ValueDescriptionLicenseManagerHostWithPortmapsLicense manager pathDefaultMapNameSiRFMapDefault name of map-fileAccessControlAllowOrigin*Policy for access-control<br />Map-files Configuration<br />What are Maps<br />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. <br />Types of Map-files<br />There are two options available for creating map-files.<br />Map-files are created using MapDotNet UX Studio software. Refer section Configure map-files using MapDotNet.<br />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.<br /> 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.<br />Configure map-config file<br />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'.<br />Verify the values listed under 'Parameters' node this file, and change if felt necessary. Details are given below:<br />ParameterDefault ValueDescriptionViaPointRadius0.0006Default route to via-point distance stored in config file.StoppageToRouteDistance0.0009Radius around a stoppage in which nearest street-segment can be located.AllRoadTypes1.2,4,8Comma-separated list of all road-types in street-network table.StreetLayerNameStreet_NetworkDefault name for street-network layer.RouteLayerNameCity_Named_RouteDefault name for named-route layer.RouteStoppageLayerNameCity_Named_Route_BusStopsDefault name for named-route stoppage layer.StoppageLayerNameCity_BusStopDefault name for stoppage layer.BoundaryCoords76.8384,28.408,77.498,28.8795Comma-separated boudns of a dynamic-layer-image.ImageDpi96Default DPI of a dynamic-layer-image.ImageFormatPNGDefault format of a dynamic-layer-image.ImageHeight800ImageWidth1000HistoryLayerNameCity_HistoryHistoryQueryselect {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;PointRadius0.0003MaxRowsForQuery200ReverseGCLayerNamesCity_Poi|City_Search_Road_Network|City_LocalityReverseGCFieldNamesPoi_Nme as POI|Road_Nme as Road,FOW_NME as Road_Type|Loc_Nme as LocalityReverseGCRadius0.0006PoiLayerNameCity_PoiPoiCategoryFieldFTR_CRYPoiNameFieldPOI_NMEPoiOutputFieldsPOI_NME as Name,FTR_CRY as Type,[DESC] as Description,CITY_NME as City,STT_NME as State,geom<br />Configure map file without MapDotNet<br />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. <br />Sample Map-files<br />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.<br />Map-file Contents<br />Each map-layer is available under a separate node, where node-name is same as layer-name. Each layer-node has 2 sections:<br />DataSource: Description about layer-data, including connection-details, table-Name, column-names, geometry-type etc.<br />DisplaySettings: Display settings for dynamically displaying a layer as image.<br />DefaultStyle: Default layer-display settings<br />MarkerStyle: Style for displaying point and multipoint features<br />PolyStyle: Style for displaying polygon and multi-polygon features<br />LineStyle: Style for displaying line and multiline features<br />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.<br />StyleClass<br />WhereClause: WhereClause for filtering data for this style<br />MarkerStyle<br />PolyStyle<br />LineStyle<br />Description of all nodes in a layer is given below:<br />ParentNodeSub-NodeDescriptionDataSource * 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-dataWhereClauseDefault where clause to filter layer-data.OutputFieldsDefault fields to return in case a query is executed on this layer.SortByDefault 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-layerMinScaleMinimum scale at which layer will start getting displayedMaxScaleMaximum scale beyond which layer will not be displayed. DetailsScaleMinimum scale at which layer-details (label and centroid) will be visible.LabelFieldName of field storing layer-data labels.ShowDirectionIf 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.ShowCentroidIf this parameter is true and if geometry-type is line or polygon, then a marker will be shown at the centroid of each layer-feature.DisplaySettings/ DefaultStyle/ MarkerStyleImageUrlURL containing marker-image. Path is relative to webservice path.ImageWidthMarker height. Default is 12.ImageWidthMarker width. Default is 12.BearingBearing/ angle at which marker is placed. Default is 0.DisplaySettings/ DefaultStyle/ FontStyleFontFamilyFont family used to display layer-labels. Default is ArialEmSizeFont-size. Default is 14.FontWeightFont weight. Possible values are black, bold, demibold, extrablack, extrabold, extralight, heavy, light, medium, normal, regular, semibold, thin, ultrablack, ultrabold, ultralight. Default is Normal.FontStyleNormal, Italic, Oblique. Default is NormalFontColorFont-color. Default is black.FontColorOpacityOpacity of font text. Value ranges from 0 to 1. Default is 1.BgColorOptional font-background color.BgOpacityFont background opacity.BgOutlineWidthFont background outline-width.BgOutlineColorFont background outline-width.BgOutlineStyleFont backgrounds outline stroke-style.BgOutlineOpacityFont backgrounds outline stroke-opacity.MinLabelSpacingMin spacing between 2 labels.OffsetXLabel will be placed at X-Offset distance from the feature-centroid.OffsetYLabel will be placed at Y-Offset distance from the feature-centroid.BearingLabel will be placed at the given angle.LabelPositionPosition of label w.r.t. centroid.DisplaySettings/ DefaultStyle/ LineStyleStrokeColorColor for line-features.StrokeWidthLine-widthLineJoinStyle used for joining line-segments of a line-feature. Possible values are Bevel, Miter, and Round. Default value is Miter.LineCapStyle used for displaying caps (ends) of line-segments of a line-feature. Possible values are Flat, Round, Square, and Rectangle. Default value is Flat.StrokeOpacityOpacity at which line-feature is drawn. Value ranges from 0 to 1.StrokeStyleLineStyle 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 gap4 2 2 32 1 1 2DisplaySettings/ DefaultStyle/ PolyStyleFillColorColor used for filling polygon-features.FillOpacityOpacity at which polygons will be filled.StrokeColorColor for outlining polygon-features.StrokeWidthOutline-widthLineJoinStyle used for joining line-segments of a polygon-outline. Possible values are Bevel, Miter, and Round. Default value is Miter.LineCapStyle used for displaying caps (ends) of line-segments of a polygon-outline. Possible values are Flat, Round, Square, and Rectangle. Default value is Flat.StrokeOpacityOpacity at which polygon-outline is drawn. Value ranges from 0 to 1.StrokeStyleLineStyle 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 2DisplaySettings/ StyleClasses/StyleClassWhereClauseWhereclause for filtering a subset of layer-dataMarkerStyleStyle used for rendering point-features of a layerLineStyleStyle used for rendering line-features of a layerPolyStyleStyle used for rendering polygon-features of a layer<br />Create Encrypted Connection String<br /> Go to MapServer's maps directory and open GenerateConnectionString.exe.<br />Type database connection parameters. Select appropriate Connection Type and click on 'Get Connection String'. This will create an encrypted connection string.<br />Open your map-file and replace this encrypted connection-string.<br />Configure map-file using MapDotNet<br />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.<br />Opening Map<br />For map design and configuration, you need to launch MapDotNet UX Studio. <br />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. <br />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.<br />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.<br />Adding Data Sources<br />Next, click on Add Data Source icon located in the Data Sources section, on the bottom-left. Further, specify the database connection parameters.<br />Adding Layers<br />To add a data layer, first select ‘rmsi_carto’ map in the Maps pane.  <br />Right-click the map and select Add Layer.  In the Add Layer dialogue, name your layer and select the data source and table name.  <br />Finally, you may have to specify the spatial reference system (SRS), which is WGS 84.<br />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.<br />Point Data<br />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. <br />Polyline Data<br />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.<br />Polygon Data<br />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.<br />Editing Layer Properties<br />After the layer is added, Studio will prompt users to specify layer properties.<br />Else you can select an existing layer from the maps pane, and click on Modify Layer option.<br />General Layer Properties<br />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.<br />Data Source and Geometry Column<br />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.<br />Classification Column<br />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.<br />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.<br />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.<br />Label Column<br />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. <br />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.<br />LineColorColumn and FillColorColumn<br />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.<br />Visible<br />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. <br />Where Clause<br />Complete the Where Clause box in order to filter data tables.  Provide a suitable SQL where clause.  Do not include the WHERE keyword.<br />For example, you wish to show all highways, whose name starts from ‘NH’. In that case, set the whereclause as ROAD_NME like ‘NH%’. <br />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<br />SRS<br />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.<br />Metadata<br />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.<br />Styles, Labels, and Markers<br />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.<br />Scale-based Display and Layer Classification<br />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. <br />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.<br />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.<br />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.<br />Classification Types<br />Below the scale group is a dropdown to select the type of classifications the group will contain.<br />All: The default classification type, selecting all will cause all features to be symbolized same way at any given scale group.<br />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.<br />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.<br />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.<br />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.<br />Clicking a Classification brings up classification property and style panels. Note that the style is displayed above the properties.  For styles, see Style Editors.<br />ID<br />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.<br />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.<br />When map changes are applied, Studio will generate unique IDs for any classifications for which an ID has not been set.<br />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.<br />MetadataUse this to attach arbitrary key-value pairs to the classification for use in your applications.<br />Editing Layer Styles <br />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.<br />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.<br />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.<br />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.<br />Which style editors are available will depend on the type of layer.  Available editors are:<br />Polygon Style <br />Polyline Style <br />Point Style <br />Optional Label <br />Optional Marker <br />Additionally, there are two sub-editors used by these.<br />Brush Selector <br />Symbol Selector <br />Polygon StyleThe polygon style editor is used for defining the fill and stroke (outline) to use for polygon features.<br />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.<br />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.<br />Polyline StyleThe polyline style editor is used for defining the stroke to use for polyline features.<br />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.<br />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.<br />For example, if you need to modify the width of City_Highway road, you need to modify the Stroke thickness value. <br />This configuration can be done for different scales as shown below.<br />Point Style<br />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.<br />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.<br />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.<br />Optional Label<br />The Optional Label editor is used for applying text labels to features.  It is only available when a layer has a LabelColumn selected.<br />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.<br />Label PropertiesFont, Size, Font Color, FontStyle, FontWeightThese set the properties of the text itself.  Size is the em-size.<br />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.<br />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.<br />OffsetX, OffsetYThis is an offset from the labeling point and is ignored when Rotate With Feature is in effect.<br />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.<br />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.<br />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.<br />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.<br />Use of this feature increases the risk of errors at tile boundaries and will require even larger bleed ratios.<br />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.<br />Brush Selector<br />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.<br />Click "Use" once you have chosen a brush and fill to select the pattern for use.<br />The brush definitions are found in [MapDotNet installation folder]StudioGeneral AssetsBrushes.xaml.  This file may be edited as desired.<br />Symbol Selector<br />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.<br />The symbol library can also be reviewed from the View menu.  Select View->Symbol Library and then select a category.<br />By default, Studio only lets you define new symbols in the "User Defined" category.  Symbols may be added to editable categories through Studio.<br />The symbol definitions are in folders under [MapDotNet installation folder]StudioSymbols.  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.<br />Editing Map Properties<br />Add, Edit or Export<br />Right-click on a map name to add layers, edit map properties, or export or delete maps.<br />Editing Map Properties<br />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.<br />TitleThe title of the map.  This is read-only.<br />Map UnitsThe distance units used by the projection the map displays data in.  This is read-only.<br />ProjectionThe Well Known Text (WKT) representation of the projection the map displays data in.  This is read-only.<br />Background ColorThe background color used by the map.<br />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."<br />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.<br />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.<br />Tile-Cache Configuration<br />Map-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.<br />Configuring Tile-Cache Path<br /><ul><li>On the server containing the map-tiles directory, create a virtual-directory on IIS called ‘tilecache’ pointing to the maptiles-directory.
  2. 2. In case of DIMTS, map-tiles have been cached and kept in C:/inetpub/wwwroot/tilecache/dimts.</li></ul>Setting up Tile-Cache on IIS<br />Follow the steps below to create a new tile-cache.<br />Download the windows installer for the latest version (2.5.1) of Python from here. <br />Run the Python installer for windows and install Python to its default location “C:Python25”.<br /> <br />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. <br />Click the ‘Edit button and add your Python path (C:Python25) to the end of the current PATH value. <br />Download TileCache from here (version 2.10). Unzip its contents to ‘C:Inetpubwwwroottilecache-2.10’. This is just a location, it can obviously be setup as a virtual directory at any path desired. <br />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). <br />Now, we need to setup IIS to run Python scripts. Find ’tilecache’ under ‘Default Web Site’ and right-click to select properties. <br />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. <br />In the ISM, right-click on ‘Default Web Site’ and select ‘Properties’. Under the ‘Home Directory’ tab, select the ‘Configuration’ button. <br />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:Python25python.exe %s %s’. In the extension field, enter ‘.py’. Check both ‘Script engine’ and ‘Check that file exists’ options. <br />This should add a new entry for ‘.py’ in the ‘Application Configuration’ dialog. <br />Open up the command prompt and change directory to ‘C:InetpubAdminScripts’. Execute the following:<br />adsutil set w3svc/AllowPathInfoForScriptMappings True <br />adsutil set w3svc/1/AllowPathInfoForScriptMappings True <br />Rename ‘C:Inetpubwwwroottilecache-2.10tilecache.cgi’ to ‘C:Inetpubwwwroottilecachetilecache.py’. <br />Edit ‘C:Inetpubwwwroottilecache-2.10tilecache.py’ and remove the first line in it that reads ‘#!/usr/bin/env python‘. Also, change the ‘Service.Load’ parameter to ‘C:Inetpubwwwroottilecachetilecache.cfg’ like shown within quotes. <br />Create a directory called ‘Cache’ under ‘C:Inetpubwwwroottilecache-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. <br />Edit ‘C:Inetpubwwwroottilecache-2.10tilecache.cfg’. Change the value for ‘base’ under the ‘[Cache]‘ section to ‘C:Inetpubwwwroottilecache-2.10Cache’, the directory where the cache will be outputted. <br />From<br /> <br />1028700288290To<br />    <br />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. <br />These are the steps to configure TileCache on IIS.<br />Look in your ‘C:Inetpubwwwroottilecache-2.10Cache’ directory as the cache is generated. You should be able to see a whole bunch directory and files being generated when browsing around. <br />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. <br />python “C:Inetpubwwwroottilecache-2.10tilecache_seed.py” “http://localhost/tilecache-2.10/tilecache.py?” DelhiBaseMap 0 2 <br />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. <br />MapServer Client-side Installation<br />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.<br />OpenLayers.js and associated files<br />mapstraction.js<br />sirfequest.js<br />MapServer has the following dependencies:<br />SSS License Manager: Installation instructions for this component are out-of-scope of this document.<br />SSS Security Server: Installation instructions for this component are out-of-scope of this document.<br />Map-data: Installation of map-data is done through GA installation.<br />OpenLayers<br />Extract OpenLayers 2.8 API files from <MapServerPath>/releases/SSS-MapServer-1.5.0.0.0 /OpenLayers-2.8.zip.<br />Extract these files and copy them to a sub-folder of your web-application.<br />Replace OpenLayers.js in the above sub-folder with the one available in <MapServerPath>/mapstraction folder.<br />Mapstraction<br />Copy latest mapstraction.js and mapstraction.config.js from <MapServerPath>/mapstraction folder to the same directory in which you have placed OpenLayers API.<br />Update server-paths in mapstraction.config.js. <br />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.<br />mapServerPathForWms: URL of web-service handling WMS-requests for dynamic layers (http://<MapServerMachine>/SiRFStudioMapServer1.5.1/MapServerHandler.ashx)<br />defaultMapName: Default map-file name used by your web-application<br />sirfrequest<br />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.<br />Update following paths in sirfrequest.js.<br />urlRouter: Location of Security Server. Ask SiRFStudio MapServer team for assistance.<br />proxyPath: Location of proxy page. Ask SiRFStudio MapServer team for assistance.<br />Document References<br />DocumentReferenceSiRF Studio Product Requirements Definition, Revision 1.0 02/20/2007<Cognidox Ref><br />Please add feedback on these documents in Cognidox or by emailing comments@csr.com.<br />Terms and Definitions<br />BlueCore®Group term for CSR’s range of Bluetooth wireless technology chipsBluetooth®Set of technologies providing audio and data transfer over short-range radio connectionsCSRCambridge Silicon RadioUniFi®Group term for CSR’s range of chips designed to meet IEEE 802.11 standards<br />

×