SQL Server R2 map report creation (5)
2.3 add a line layer to a map
Based on the preceding report, we will add a map layer that represents the route between two stores. Here we still use the SQL space data source, some steps are similar to the previous section, the difference is that the corresponding SQL statement uses the following:
Select n 'path' as name, cast ('linestring ( -120.352399683576 46.5526404267361, -119.8 46.3, -119.05828472 46.2734923199999) 'as geography) as route |
The query view is as follows:
On the "select space data and map view options" page, "Space Field" is "Route" and "layer type" is "line ". Accept other default values. The map view displays the path from a store in Yakima County to a store in Franklin County, as shown in:
On the "select map visualization" page, click "basic line chart"
On "select color subject and data visualization", select the "monochrome Chart" option. The path is displayed in a certain color based on the selected topic, as shown in:
Click Finish ". You will be added to the map. The "map layer" area displays a new layer of linelayer1 and the spatial data source type "dataset ". In this example, the spatial data comes from the data source, but the data is not analyzed and associated with this line.
The report preview is as follows: