Slide 1

Slide 1 text

We — OpenSource ...but still use Google Maps for our mapping needs

Slide 2

Slide 2 text

We — OpenSource ...but still use Google Maps for our mapping needs that sucks!

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

http://www.flickr.com/photos/mnemonic/56371107/ refueling - gas station

Slide 6

Slide 6 text

1st idea? $  curl  https://maps.googleapis.com/maps/api/place/search/json? types=gas_station&location=50.937531,6.960279&radius=1000 {        "results":  [                {                        "name":  "Total",                        "geometry":  {                                "location":  {  "lng":  6.962109,  "lat":  50.931382  }                        },                        "id":  "715ab63f7babd311a1df1fe15d7641e4ecd103fc",                        "vicinity":  "Holzmarkt  49,  Cologne"                },                {                        "name":  "Cäcilienstraße",                        "geometry":  {                                "location":  {  "lng":  6.951002,  "lat":  50.935464  }                        },                        "id":  "3179f8caadae916de2eea33b64a13de1d00ece47",                        "vicinity":  "Cäcilienstraße  32,  Cologne"                },                    ...        ] } ✓

Slide 7

Slide 7 text

Problem? https://developers.google.com/maps/terms 10.1.3 Restrictions against Data Export or Copying. (b) No Pre-Fetching, Caching, or Storage of Content. You must not pre- fetch, cache, or store any Content, except that you may store: (i) limited amounts of Content for the purpose of improving the performance of your Maps API Implementation if you do so temporarily, securely, and in a manner that does not permit use of the Content outside of the Service; and (ii) any content identifier or key that the Maps APIs Documentation specifically permits you to store. For example, you must not use the Content to create an independent database of "places" or other local listings information.

Slide 8

Slide 8 text

Also... https://developers.google.com/maps/faq#usage_pricing

Slide 9

Slide 9 text

2nd idea? $  curl  https://api.foursquare.com/v2/search? ll=50.937531,6.960279&radius=1000& intent=browse&categoryId=4bf58dd8d48988d113951735 {   venues:  [   {     id:  "4d99f57f97d06ea8c4ae550b",     name:  "Total  Tankstelle",     location:  {        lat:  50.9312361,  lng:  6.96271096,  country:  "Germany",     }   },   {     id:  "4f527021e4b0195da3d1a97e",     name:  "bonjour",     location:  {                lat:  50.931198,  lng:  6.962518,  country:  "Germany"     }   }] }

Slide 10

Slide 10 text

3rd idea? - copy & distribute - adapt the work - COMMERCIAL USE - Attribute - Share under the same license

Slide 11

Slide 11 text

$  brew  install  osmosis $  wget  http://download.geofabrik.de/osm/europe/germany.osm.bz2  ... $  osmosis  -­‐-­‐read-­‐xml  file="germany.osm"                    -­‐-­‐node-­‐key-­‐value  keyValueList="amenity.fuel"                    -­‐-­‐write-­‐xml  file="german-­‐gas.osm" Grab data...                                                                

Slide 12

Slide 12 text

giving back

Slide 13

Slide 13 text

13640 gas stations ~ 9867 without city ~ 11071 without address ~ 8960 without operator ~ 11356 without hours ROOM for improvement

Slide 14

Slide 14 text

twice user has been at a gas station we ask two take two minutes and add the information that can be found on the receipt, anyways! verify by us or other users ➙ Contribute back to OSM * I lost an extra ,w‘ somewhere on the page ...

Slide 15

Slide 15 text

go further...

Slide 16

Slide 16 text

map? I‘m not using their data why should I use their

Slide 17

Slide 17 text

Started to look around + =—

Slide 18

Slide 18 text

Awesome API! var center = new L.LatLng(50.941252, 6.958283); var map = new L.Map('map', { center: center, zoom: 13 }); var cloudmade = new L.TileLayer('http://{s}. tile.cloudmade.com/.../997/256/{z}/{x}/ {y}.png'); map.addLayer(cloudmade); var marker = new L.Marker(center); map.addLayer(marker); marker.bindPopup('Dom').openPopup();

Slide 19

Slide 19 text

Awesome API! var center = new L.LatLng(50.941252, 6.958283); var map = new L.Map('map', { center: center, zoom: 13 }); var cloudmade = new L.TileLayer('http://{s}. tile.cloudmade.com/.../997/256/{z}/{x}/ {y}.png'); map.addLayer(cloudmade); var polygonPoints = [ new L.LatLng(50.974265,7.028418), new L.LatLng(50.953777,7.03760), new L.LatLng(50.964211,7.071762), new L.LatLng(50.974102,7.059317), new L.LatLng(50.985234,7.049274) ]; var polygon = new L.Polygon(polygonPoints); map.addLayer(polygon);

Slide 20

Slide 20 text

Awesome API! var center = new L.LatLng(50.941252, 6.958283); var map = new L.Map('map', { center: center, zoom: 13 }); var cloudmade = new L.TileLayer('http://{s}. tile.cloudmade.com/.../997/256/{z}/{x}/ {y}.png'); map.addLayer(cloudmade); map.on('click', mapClickEvent); function mapClickEvent(e) { var marker = new L.Marker(e.latlng); map.addLayer(marker); }

Slide 21

Slide 21 text

Awesome API! var center = new L.LatLng(50.941252, 6.958283); var map = new L.Map('map', { center: center, zoom: 13 }); var opencycle = new L.TileLayer('http:// {s}.tile.opencyclemap.org/cycle/{z}/{x}/ {y}.png'); map.addLayer(opencycle); var marker = new L.Marker(center); map.addLayer(marker); marker.bindPopup('Dom').openPopup();

Slide 22

Slide 22 text

Awesome API! ... var center = new L.LatLng(50.941252, 6.958283); var map = new L.Map('map', { center: center, zoom: 13 }); var gmaps = new L.Google('ROADMAP'); //var gmaps = new L.Google('SATELLITE'); map.addLayer(gmaps); var marker = new L.Marker(center); map.addLayer(marker); marker.bindPopup('Dom').openPopup();

Slide 23

Slide 23 text

Awesome API! ... var gmaps_s = new L.Google('SATELLITE'); var gmaps_r = new L.Google('ROADMAP'); var cloudmade = new L.TileLayer('http:// {s}.tile.cloudmade.com/.../997/256/{z}/{x}/ {y}.png'); var opencycle = new L.TileLayer('http:// {s}.tile.opencyclemap.org/cycle/{z}/{x}/ {y}.png', ); map.addLayer(cloudmade) // all the layers! var maps = { "Cloudmade": cloudmade, "Google Maps - Roadmap": gmaps_r, "Google Maps - Satellite": gmaps_s, "OpenCycleMap": opencycle }; var layersControl = new L.Control.Layers(maps); map.addControl(layersControl); ...

Slide 24

Slide 24 text

Awesome API! ... var gmaps_s = new L.Google('SATELLITE'); var gmaps_r = new L.Google('ROADMAP'); var cloudmade = new L.TileLayer('http:// {s}.tile.cloudmade.com/.../997/256/{z}/{x}/ {y}.png'); var opencycle = new L.TileLayer('http:// {s}.tile.opencyclemap.org/cycle/{z}/{x}/ {y}.png', ); map.addLayer(cloudmade) // all the layers! var maps = { "Cloudmade": cloudmade, "Google Maps - Roadmap": gmaps_r, "Google Maps - Satellite": gmaps_s, "OpenCycleMap": opencycle }; var layersControl = new L.Control.Layers(maps); map.addControl(layersControl); ...

Slide 25

Slide 25 text

Awesome API! ... var gmaps_s = new L.Google('SATELLITE'); var gmaps_r = new L.Google('ROADMAP'); var cloudmade = new L.TileLayer('http:// {s}.tile.cloudmade.com/.../997/256/{z}/{x}/ {y}.png'); var opencycle = new L.TileLayer('http:// {s}.tile.opencyclemap.org/cycle/{z}/{x}/ {y}.png', ); map.addLayer(cloudmade) // all the layers! var maps = { "Cloudmade": cloudmade, "Google Maps - Roadmap": gmaps_r, "Google Maps - Satellite": gmaps_s, "OpenCycleMap": opencycle }; var layersControl = new L.Control.Layers(maps); map.addControl(layersControl); ...

Slide 26

Slide 26 text

catch? Is there a

Slide 27

Slide 27 text

using alexreisner/geocoder? Configure it to not use: - Google - Yahoo - Bing

Slide 28

Slide 28 text

Klaus Zanders @klaustopher www.klauszanders.de