RSSAmplifier

Blog

Gavin Rehkemper

Recent content on Gavin Rehkemper

gavinr.comRSS feed ↗20 posts

Latest posts

USA Counties

There are 3,142 counties in the United States of America. County Name Frequencies The most popular names for counties are past US presidents and founding fathers. 31 states have a “Washington” county, 26 states have a “Jefferson” county, and 24 four states have Franklin, Jackson, and Lincoln counties. Here is the full list: And here’s an interactive map showing the…

Joplin Bulletify

Joplin is note-taking software that I appreciate and use a lot. I use it to take all kinds of notes at home and work. I have one specific workflow where I copy/paste some lines of text into a Joplin note, and I need to make all the lines (that are not headers) into bulleted lines. The default bullet tool doesn’t work because it makes anything that is highlighted into bullets. So I created a…

Map Your Luck

Just for fun, I thought it might be interesting to bring some of the ideas of the old game show Press your Luck … over into an interactive web map: There is no “whammy” in mine - it’s more of just a random item chooser. From the homepage you can select which “type” of geography you want to use (world countries, USA states, etc.) or you use your own layer by…

Filter Tiled Layers

One of the core ideas in mapping is the difference between vector and raster layers. For vector layers, the actual geometry data is stored and passed around - for example a point might store the latitude and longitude. For tiled raster layers, the data is stored as images on the server, and those images are displayed as the layer. In the past, the visualization of tiled raster layers could not be…

Using the WGS 84 Coordinate System in ArcGIS JavaScript Maps

Web Mercator is the standard for online interactive maps. It has been the standard since Google Maps first used it in 2005. In the ArcGIS Maps SDK for JavaScript, Web Mercator basemaps are built-in and can be referenced by name . The data for the built-in basemaps can be found in Basemap.js . Here’s a JavaScript demo showing that raw data: See the Pen ArcGIS Maps SDK for JavaScript 4 -…

Clean Pull Request Diffs

When collaborating on code with others using Git, keeping the overall list of code changes (the “diff”) in a pull request as small as possible - not including lots of unnecessary changes like quotes and tabbing - is an important and considerate thing to do. Why lots of unrelated changes suck A pull request (aka merge request) represents a request to merge a branch that has multiple…

Georeference an Image with an Extent in ArcGIS Pro

You can do a lot with rasters and imagery in ArcGIS Pro, the most basic of which is adding an image to a map. When adding an image to a map, if it does not have geographical metadata within the file, the image will be placed at (0, 0) - Null Island . To place the image at the correct location, you must tell ArcGIS Pro where on the map to place it. This is called Georeferencing. The way to…

The Elusive Draggable Map Popup

In the ArcGIS Maps SDK for JavaScript , the popup widget displays the attributes for individual features on the map. It appears when the user clicks on a feature on the map. In certain cases, you may want the user to be able to move the popup by dragging the mouse cursor. But there’s no way to enable that in the API! Allowing the user to move the popup is not common and probably not best…

Query All Features from a Feature Service

When querying an ArcGIS Feature Service, there is typically a maximum number of features (records) that will be returned from any query – usually set to 1000. If you want to query for all the features in the service, ArcGIS REST JS does not currently do this (see this discussion ) - you’ll need to make multiple REST calls to get them all. Use the package query-all-features to do this. First…

Import Mapping Libraries from a URL

When adding functionality to a web page using JavaScript, you may rely on external libraries (like a mapping library) to provide that functionality so you do not need to write it yourself. There are many ways to use, or import, these libraries into the page. A new method is to use ES Modules to import third-party JavaScript libraries into your application from a URL . Using this method is easier…

Yearly Checklist

Happy new year! It’s a great time to complete those yearly things that are easily forgotten during the rest of the year: backups, privcy opt-outs, and software updates. Backups If you don’t already have a daily backup system for your regularly-used files, set that up! Backblaze or SpiderOak are great options. If you already have this set up, now is a great time to make sure it’s…

Support Software Developers

Support what you use and enjoy. This is true in all aspects of life, including software. Especially open source software. Here are a few simple ways to do that. 1. “Star” the project on GitHub (FREE) Giving a project a “star” tells the developer that you appreciate their effort. It costs you nothing, but is quite encouraging to the developer when it appears in the feed.…

Quick Start Script for ArcGIS Experience Builder

If you develop with ArcGIS Experience Builder, you know that getting started is a multi-step process. It would be nice to get started a little more quickly. Here’s a simple Windows batch script that will do that. It installs the dependencies, if necessary, and then starts up the Experience Builder server. if exist ArcGISExperienceBuilder/client/node_modules\ ( cmd /c start powershell -noexit…

SpongeBob Time Cards Generator

You need a SpongeBob time card with your own text on it - what do you do? Use the SpongeBob Time Cards Generator of course! You can set your own message, choose from a variety of backgrounds, and change the text size. It even uses a SpongeBob style font! Check it out at spongebob.gavinr.com .

Automatic Wikipedia Links in ArcGIS Online Popups

When adding a link to a popup in a map, using attribute-based URL parameters is a powerful ability. Bern Szukalski explains how to do this in this blog post . He shows how to take the numeric ID from the a clicked feature (property parcel, in this case) and create a link with the ID so when the user clicks it will open the web page for that specific property ID. What if you don’t have IDs…

Map Stream

Map Stream is a web app showing a live stream of newly-updated public maps on ArcGIS Online. The interesting thing about watching everything stream by is the variety: topic, location, age, popularity. Just about anything can pop up. Built with Svelte, the source code is public: github.com/gavinr/map-stream . Check it out: map-stream.gavinr.com

DigitalHealth Class

When my friend Jake wakes up in the morning he immediately grabs his iPhone and checks Facebook. How common is that? Do you do it? Is waking up and checking Facebook healthy? What is the ideal relationship between humans and technology? We are still figuring that out, but some things are clear: Social media is the “junk food” of the internet. We must take steps to ensure the security…

Find Latitude/Longitude Coordinates in Two Clicks

Finding the latitude and longitude coordinates of a particular location is not as easy as it should be. You can get it from Google Maps, but it requires 3 or 4 clicks. There are also a bunch of sites devoted to the task - most with ads and invasive spyware slowing down the page. We need something better - that’s why I created Latitude Longitude Locate . Latitude Longitude Locate is a simple…

Query to Get All Features in the ArcGIS Maps SDK for JavaScript

When you’re querying a Feature Service in the ArcGIS Maps SDK for JavaScript, there’s typically a maximum number of features (records) that will be returned from any query – usually set to 1000. If you want to get all the features in the service, you’ll need to make multiple queries to the service. The best way to do this is with a recursive function that checks if the…

My Favorite ArcGIS JavaScript API CodePens

Here are some of my favorite code samples I’ve collected on my CodePen account over the past few years. Centered Modal Geolocation Search This CodePen shows a modal with the Search widget to allow a user to type in their location. When they search, the modal is hidden. Live-Updating Protobuf Data on the Map This CodePen gets current bus locations from a Protocol Buffer feed and shows them on…