Skip to content

Instantly share code, notes, and snippets.

View grodrigues142's full-sized avatar

Gabriel Rodrigues grodrigues142

View GitHub Profile
@grodrigues142
grodrigues142 / main.js
Last active August 29, 2015 14:17 — forked from miguelpeixe/main.js
// Inicia o mapa com o Leaflet
var map = L.map('map', {center: [0,0], zoom: 2});
// Adiciona camada base (tiles do OpenStreetMap)
L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png').addTo(map);
// Camadas do CartoDB
@grodrigues142
grodrigues142 / main.js
Last active August 29, 2015 14:16 — forked from miguelpeixe/main.js
// Inicia o mapa com o Leaflet
var map = L.map('map', {center: [0,0], zoom: 2});
// Adiciona camada base (tiles do OpenStreetMap)
L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png').addTo(map);
// Camadas do CartoDB
<?php
// Parsing this spreadsheet: https://spreadsheets.google.com/pub?key=0Ah0xU81penP1dFNLWk5YMW41dkcwa1JNQXk3YUJoOXc&hl=en&output=html
$url = 'http://spreadsheets.google.com/feeds/list/0Ah0xU81penP1dFNLWk5YMW41dkcwa1JNQXk3YUJoOXc/od6/public/values?alt=json';
$file= file_get_contents($url);
$json = json_decode($file);
$rows = $json->{'feed'}->{'entry'};
foreach($rows as $row) {
echo '<p>';