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.


Wednesday, July 29, 2015

File Permissions When Logging Onto AWS


When logging onto my AWS instance with the following command:

ssh -i arcgis-HGL-2.pem arcgis@52.5.49.204

I got the following error:

Dave$ ssh -i arcgis-HGL-2.pem arcgis@52.5.49.204
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@         WARNING: UNPROTECTED PRIVATE KEY FILE!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0644 for 'arcgis-HGL-2.pem' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
bad permissions: ignore key: arcgis-HGL-2.pem

Permission denied (publickey).

The solution was:


chmod 400 arcgis-HGL-2.pem 

Tuesday, July 28, 2015

HOLLIS+ Now Has Geographic Extent


The Harvard Library Catalog now has data extent for part of the collection. This was made possible by the extensive metadata developed for the Harvard Geospatial Library.


Test it yourself here.

The map inset uses the Leaflet Javascript library.
The Harvard Map Collection published a Sea Atlas viewer. It's fun to explore. Check it out here. The map uses the Leaflet Javascript library and is placed in the public domain. See it on GitHub.


Monday, April 27, 2015

Raster Performance: OpenLayers vs. Leaflet

I'm starting to make general comparisons of the performance speed between Leaflet and OpenLayers for displaying raster data from my spatial data repository. The stack includes an ArcSDE 9.3.1 instance running on RHEL and Oracle 11g. I'm using Geoserver to hit the database and serve images as WMS requests. I've embedded two web pages here as iFrames for experimentation. Among many factors that can impact speed, embedding an API in a complex web mapping application can affect performance differently, especially when other APIs like jQuery are used in the same web space.

Leaflet:
OpenLayers

General Observations on the Two APIs


I've found Leaflet to be much easier to understand and use. It's a smaller, newer Javascript library and is more intuitive and user than OpenLayers, and I have been using OpenLayers for at least 5 years. OpenLayers is an excellent API for web mapping but I have found its syntax difficult to understand and follow. It's a very large API and implements a lot of heavy GIS functionality. That's great, but not always needed in fast web mapping scenarios. OpenLayers is not as intuitive to me, and it takes me longer to generate simple map examples in OpenLayers than it does with Leaflet, especially if I have multiple data formats and mixed projections.

iFrames created using iframe Generator Tool