You're probably familiar with seeing lines on map applications indicating a route or path. A line layer is quite similar to a point layer. They are both defined by their coordinates. The difference is that a line layer requires two sets of coordinates [(x1 y1), (x2 y2)], whereas a point has only an (x y) coordinate.
ds_Mapline
:SELECT CAST('LINESTRING( -122.164644615406 47.7869921906598, 16.0414569096018 49.6523079296896, -122.164644615406 47.7869921906598, 2.32573072365188 48.8385347036971, -122.164644615406 47.7869921906598, 6.93164071591788 51.5966635525063, -122.164644615406 47.7869921906598, 20.0414569096018 49.6523079296896 )' AS GEOGRAPHY) as Line
You may be wondering what these coordinates (spatial data) are; these are randomly selected from the Person.Address
table in the AdventureWorks2012
database.
Let's preview our map with the added line layer:
18.219.220.22