O'Reilly logo

SQL Server 2012 Reporting Services Blueprints by Mickey Stuewe, Marlon Ribunal

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding a line layer

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.

  1. Create a new dataset with the following T-SQL command, and name it 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

    Tip

    Or ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required