How do I add mile markers to Google Maps in my app?
Google Maps doesn't have a mile marker layer, so you bring your own points. Load a GeoJSON file of mile markers onto the map and style it. On the web that is one call to the Maps JavaScript API.
On the web
The Data layer reads GeoJSON directly (Google Maps Platform docs):
map.data.loadGeoJson('/data/mileposts_UT.geojson');
map.data.setStyle(f => ({
label: String(f.getProperty('marker'))
}));
On Android and iOS
The Maps SDK utility libraries have a GeoJSON layer for Android and a GeoJSON renderer for iOS. With thousands of points per state, show only every 5th or 10th marker when zoomed out, or cluster them.
Where the points come from
From each state DOT, or from one file for all 50 states. The MileCheck milepost dataset ships one GeoJSON per state with the same fields everywhere, including the route as it reads on the sign. Its license includes showing the markers to your own customers and drivers. Try the free Utah sample first.
Showing the nearest marker to a user
If you only need "you are at mile 147", not the whole layer, call /v1/locate with the user's position.
Mile marker data for all 50 states
396,842 marker positions as CSV and GeoJSON, one layout for every state, with a list of what changed in each release. Download the Utah sample with no form.
Questions, answered
Can I use Google's own data for mile markers?
No. Google Maps Platform doesn't expose mile markers.
Will 400,000 points slow my map down?
Loading all of them at once will. Load one state at a time and thin the points by zoom level.