Dev.to WebDev 🛠 Dev 👁 0 📖 1 min read

How do you put a GPS dot on a hand-drawn campground map?

A campground map is usually a drawing. When I added a “Guide me” button to the StillDeep Camping demo, the browser could give me the camper’s latitude and longitude. I still had to connect those coordinates to the pictur

How do you put a GPS dot on a hand-drawn campground map?

A campground map is usually a drawing. When I added a “Guide me” button to the StillDeep Camping demo, the browser could give me the camper’s latitude and longitude. I still had to connect those coordinates to the picture on the screen.

Give the map real reference points

I made it possible for a staff member to stand on a campsite, open the admin screen on their phone and record the position there. A campsite then has a place on the drawing and coordinates in the real world. The same idea works for destinations such as the camp store. In the public demo, those coordinates are fictional.

Campground plan showing the selected starting point and the line to a campsite

Let the camper put down the first pin

I wanted the page to work for someone who would rather keep location access off. They can choose their starting point on the map and still see where the destination is. With permission, the phone supplies the starting point and updates the straight-line distance as the camper walks.

Keeping the distance and the map together also makes the limit visible. A line across the drawing can tell you how far away the campsite is. The paths on the campground plan are what tell you how to get there.

The full development note has screenshots of the map and the reservation flow.

📰 Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.