Monday, August 24, 2015

Leaflet API Change


Looks like Leaflet changed the API for adding Openstreetmap to your map in Javascript. I had to make the following changes today:

From:

          L.tileLayer('https://{s}.tiles.mapbox.com/v3/{id}/{z}/{x}/{y}.png', {
                        maxZoom: 18,
                        attribution: 'Map data © +
                        <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, ' +
                        '<a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' +
                        'Imagery © <a href="http://mapbox.com">Mapbox</a>',
                        id: 'examples.map-i875mjb7'
                }).addTo(map);


To:


                L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
                    attribution: '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
                }).addTo(map);

Satellite Map


This is a fun map to look at. You can zoom, pan and change the view angle. Click on a point to identify the satellite.


Project Sunroof


Google's come out with a pretty slick application to determine potential savings by changing to solar. Check it out here.