On this map we create two CartodB layers, one of them is built with two sublayers. In order to control when they are added to the map, we save the promises objects and use the jQuery.when function to execute the code to add the layers to the map when both promises are executed.
The MIT License (MIT)
Copyright (c) 2015 Juan Cruz-Benito. http://juancb.es
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR I
|<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->|
|<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->|
|<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->|
|<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->|
|<meta http-equiv="X-UA-Compatible" content="IE=edge">|
My goal here was the create a routable graph for Chicago.
I used Ubuntu 12.04LTS on an m2.4xlarge just to be sure memory wasn't too much of an issue.
screen session and start downloading an OSM extract (I used this extract of Illinois). In another screen I did the following:
sudo apt-get update && sudo apt-get upgrade -y sudo apt-get -y install git make cmake build-essential \
Install Cucumber with Rspec, Guard, Factory Girl(?) and Spork
Using during Hartl rails 4.0 guide (http://ruby.railstutorial.org/chapters)
group :development, :test gem 'guard-rspec' gem 'guard-livereload' gem 'spork-rails', github: 'sporkrb/spork-rails' # rubygems version not rails 4 compatible gem 'guard-spork'
|class YourController < ApplicationController|
|before_filter :cors_preflight_check, only: [:settings]|
|after_filter :cors_set_access_control_headers, only: [:settings]|
|# YOUR CODE TO GET CLIENT'S WIDGET SETTINGS HERE|
|headers['Access-Control-Allow-Origin'] = '*'|