This file contains 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
################################################# | |
################################################# | |
## _____ _ __ _____ _ _ _ ## | |
## / __ \| | / /| ___| | (_) | ## | |
## | / \/| |/ / | |__ __| |_| |_ ___ _ __ ## | |
## | | | \ | __|/ _` | | __/ _ \| '__| ## | |
## | \__/\| |\ \| |__| (_| | | || (_) | | ## | |
## \____/\_| \_/\____/\__,_|_|\__\___/|_| ## | |
## ## | |
################################################# |
This file contains 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
* { | |
font-family: "Helvetica Neue", Helvetica; | |
font-size: 15px; | |
font-variant: normal; | |
padding: 0; | |
margin: 0; | |
} | |
html { | |
height: 100%; |
$ uname -r
You could have postgre installed on localhost with password (or without user or password seted after instalation) but if we are developing we really don't need password, so configuring postgre server without password for all your rails project is usefull.
- postgresql
- postgresql-client
- libpq-dev
This file contains 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
SELECT | |
1 as cartodb_id, length, shape as the_geom, 'Madrid' as origin | |
FROM | |
cdb_route_point_to_point( | |
cdb_geocode_namedplace_point('Madrid', 'Spain'), | |
cdb_geocode_namedplace_point('Rome', 'Italy'), | |
'car') | |
UNION ALL | |
SELECT | |
2 as cartodb_id, length, shape as the_geom, 'Paris' as origin |
This file contains 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 ap AS ( | |
SELECT | |
array_agg(the_geom) as arr | |
FROM | |
etapas | |
) | |
SELECT | |
(cdb_route_with_waypoints(arr, 'walk')).* | |
FROM | |
ap |
This file contains 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
source 'https://rubygems.org' | |
# default gems here | |
#--------------------------- | |
# add paperclip and bootstrap | |
gem "paperclip", "~> 4.1" | |
gem 'bootstrap-sass', '~> 3.1.1' |
This example shows how to create a Leaflet map with a basemap and an empty CartoDB.js layer. Once the layer is created a function is attached the event of the layers selector checkboxes so on any state change, the sublayers are removed and recreated according to the user selection.