Created
July 26, 2016 14:51
-
-
Save ramiroaznar/8cb2e16bfaaed3d1374ee9c75f9db4e4 to your computer and use it in GitHub Desktop.
SQL & CartoCSS for routing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WITH | |
origin as ( | |
SELECT the_geom FROM table_name WHERE cartodb_id = 1 | |
), | |
destiny as ( | |
SELECT the_geom FROM table_name WHERE cartodb_id = 2 | |
) | |
SELECT ST_Transform(shape, 3857) as the_geom_webmercator | |
FROM origin, destiny, cdb_route_point_to_point(origin.the_geom, destiny.the_geom, 'car') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#table_name{ | |
line-opacity: 1; | |
line-color: #000; | |
line-width: 5; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment