Blog

2019

Network Tracing with Turf JS

A Client Side Solution for Simple Upstream and Downstream Linear Network Analysis

Posted

Network Tracing with Turf JS

A primary focus of my day job is managing utility datasets for a small municipality. I am currently in the process of taking a simple database of lines and points and turning it into a true utility network. One of the benefits of having this new seamless database is to perform network traces. This is possible using a variety of desktop and server tools including geometric networks in ArcGIS Desktop, the ArcGIS Utility Network Management extension for ArcGIS Server/Enterprise, pgRouting, and via various QGIS plugins. However, the utility field crews and managers only have access to our web maps, so I wondered if I could program a Mapbox GL JS plugin to do some simple network tracing directly in the browser. Fortunately in my case the entire database is less than 3MB, so all the data can be loaded into the browser via GeoJSON. This data can then be visualized and analyzed using client-side libraries, in this instance Mapbox GL and Turf JS.

Continue Reading...

Open Parcel Viewer

A Client-Side Parcel Viewer built with Leaflet

Posted

Open Parcel Viewer

The Open Parcel Viewer is a client-side application written in plain javascript and jquery. It is capable of rendering up to 50k polygons on desktop and mobile. The app uses Leaflet as the mapping api and Jekyll as a build tool. Color, initial map center/zoom and the search field can be defined in the yaml front matter, with minimal to zero extra coding needed. The polygons should be in topojson format.

Continue Reading...

Leaflet Store Locator

A Leaflet Version of the Original Mapbox JS Store Locator Example

Posted

Leaflet Store Locator

This simple, responsive store locator is based on the original Mapbox JS example, tweaked to use Leaflet 1.0 and custom icons. The sidebar uses a jQuery filter function (thanks jsfiddle). The nearest store function uses TurfJS, based loosely on this example. The production version uses surge.sh for deployment. This app was originnally created in collaboration with Nick Kroncke for Shagbark.

Continue Reading...