Taken from
http://esri.github.io/esri-leaflet/examples/customizing-popups.html
Show the gas stations within a route using TurfJS
Use heatmap.js to see the Spanish gas stations that serve gasolina95 over 1.3€/litre.
Gas station price list last updated on 7-mars 2015.
Data from geoportalgasolineras.es.
<html> | |
<head> | |
<title>Duero</title> | |
<script src="http://openlayers.org/api/OpenLayers.js"></script> | |
<link rel="stylesheet" href="openlayers/theme/default/style.css" type="text/css"> | |
<style> | |
#map-id { | |
width: 1024px; | |
height: 512px; | |
} |
__author__ = 'avbcmati' | |
# -*- coding: utf-8 -*- | |
import csv | |
#creo un fichero con los datos | |
datos = [ | |
['Teclado', 10, 56.5], | |
['Torre', 9, 99.5], | |
['Pantalla', 100, 56.5] |
function creaChart(cartoData,barrio){ | |
$('#highchart').highcharts({ | |
chart: { | |
type: 'line', | |
marginRight: 50, | |
marginBottom: 50, | |
marginTop:100 | |
}, | |
title: { | |
text: 'Distribución Renta BCN | Indice RFD', |
function charts(data_id) { | |
var campo = data_id; | |
var url ="http://{username}.cartodb.com/api/v1/sql?q=SELECT nbarri,rfd_2008,rfd_2009,rfd_2010, rfd_2011 FROM {tablename} WHERE cartodb_id="+campo+"" | |
console.log(url); | |
var cartoItems = []; | |
$.getJSON(url, function(data) { | |
$.each(data.rows, function(key, val) { | |
cartoItems.push(val.rfd_2008); | |
cartoItems.push(val.rfd_2009); | |
cartoItems.push(val.rfd_2010); |
layer.on('featureClick', function(e, pos, latlng, data) { | |
charts(data.cartodb_id); | |
}); |
<script src="https://embed.github.com/view/geojson/mappingCo/BCN/master/MurallaRomana.geojson"></script |
> mongo | |
> use geospatial | |
switched to db geospatial | |
> db.geometrias.find() | |
> db.geometrias.insert({geo: {type: "Polygon",coordinates: [[ [2.1849489212036133, 41.38680675397411], [2.1849489212036133, 41.39039671055913], [2.1898841857910156, 41.39039671055913], [2.1898841857910156, 41.38680675397411],[2.1849489212036133, 41.38680675397411] ]] }}) | |
> db.geometrias.insert({geo: {type: "Polygon",coordinates: [[ [2.186858654022217, 41.389913768298356], [2.186858654022217, 41.392392833843616], [2.194089889526367, 41.392392833843616], [2.194089889526367, 41.389913768298356], [2.186858654022217, 41.389913768298356] ]] }}) |