Lab 4: Live Data

Utilization of "real time" data in webmaps.

503 Lab 4.1: MODIS Fire Detections
Using Google Maps API with KML

This map displays MODIS fire detection data using the Google Maps API. The data is in KMZ format and hosted by the National Wildfire Coordinating Group.

KML is difficult to work with beyond loading it, so the styling is just default markers. In this case, the layers in the KML include detection polygons and their centroids along with a legend and a bounding box (which ideally would be hidden or replaced with page elements). It MAY be possible to only display certain layers from the KML, but I was not able to locate an example of this in the Google Maps API documentation.

503 Lab 4.2: Earthquake Map
Using Google Maps API with geoJSON

This map displays live earthquake data from the USGS. Symbols are scaled based off earthquake magnitude. Mousing over a symbol will provide additional information in the info window at the top of the map. I centered it over Tokyo since earthquakes are quite frequent in Japan.

503 Lab 4.3: MODIS Fire Detections (Again)
Using Esri Javascript API with KML

This map uses the same MODIS KML data as the 4.1 map but in the Esri Javascript API. The symbology supplied by the KML displays as opposed to the Google Maps API. All the KML layers, except the legend, still show up, but I believe it is possible to select only certain layers for display (I just wasn't able to get it working in time).

I added a legend to the meta data window. It uses SVGs to display the symbols.

Final Thoughts on Each API

I had a number of technical issues when working on this lab. The Google Maps API in particular gave me issues. I am not a fan of how it organizes things and found it difficult to make anything beyond superficial changes to examples given. I feel like I would have had fewer issues if I had started with the Leaflet or Mapbox APIs. I personally would avoid it for anything beyond simple maps.

I had a few issues with the Esri API as well, but far fewer despite it being more complex code (most of the complexity looks be more of a wrapper). It is reasonably easy to work with and seems to be more flexible as well. I liked their documentation more too. I would use this API again.

One final thought: it was harder to find real time KML and geoJSON data than I thought it would be. It looks like a lot of places are going away from KML in favor of other formats for one. Most "live" data either required a subscription or didn't allow CORS, which is why I ended up sticking with the earthquake data for 4.2. This makes sense in hindsight though, as if it's being hosted on local infrastructure, an unexpected spike in usage could cripple servers, and if it's being hosted by AWS, for example, that unexpected spike could result in unexpected costs as things scale up to handle it.