Easy API question
My local SAR team is still in the stone age, I have recently volunteered and have a very strong background in IT and drones. I'm currently building out a command center including using caltopo for our ground search team and DJI Flight Hub 2 for our aireal assets. The ground teams consists of your regular joes, wen it comes to IT so I am trying to keep the simpliest solutions possible. Since everyone has an iphone in thier pocket anyway i wrote a quck web application to get the uiphones lat & lon and send it to our caltopo map so we know where our ground crews are. Obviously a very important detail !
Basically the users go to a website, click the update my location button and then that is sending the api call off like this,
const apiUrl = `https://caltopo.com/api/v1/position/report/other?id=${callSign}&lat=${latitude}&lng=${longitude}`;
I get this:
{"result":{},"status":"ok","timestamp":1730233163359}
However no pin is showing up on my map. im missing something simple im sure, like not hitting the right api point, but im not sure of the answer juat yet. Any help would greatly be appreciated by myself and my entire rural west TN county
Comments
6 comments
I don’t work for CalTopo but my team uses it on just about all of our operations. If your team doesn’t already have a team account, you should consider subscribing. There are many features that are very useful. The app does exactly what you want and also can record an entire track and place it on a map in real time if the phone has an internet connection.
Yes, I have all ready requested a team quote for our very small team. I am not in charge, just a volunteer. But the only other way i see in caltopo to get your search teams current location is with a garmin, we dont have the budget for 6 of them. But everyone has a phone, I just need help on making this API call. Without being able to track our ground teams locations in real time, it negates almost every other planned update. Like drone intergration. So I have to get this working, it's just a simple API call and it's successful, i just dont think i set something up correctly and the api call isnt going to my specific map, it's successful. I just dont see the Pin it should have added to the map.
I believe my issue is due to my API call not including any identfying information about my caltopo account or map. I tried playing with the api a little and tried https://caltopo.com/api/v1/position/report/SARTRUCKS?id=northcott&lat=35.8191348&lng=-89.6033665&mapId=4EU7704 which give me a success message, but i dont see a pin at the location on the map identified in the api call
Did you add a Locator to the map you are wanting the location to show up on? Your URL works for me and adds a pin at the location if I first add a Locator to the map. On a saved map click Add and then Locator and then Live Track - Fleet, Email, Other and add the relevant information.
Before we had a team account, I would create a map and then share the map with a link. The other team members would have CalTopo app on their phone and, with the link I provided, they have update access to my map. They can create tracks on my map and everyone with a link to my map can add objects like marker and tracks.
Sam Chan
OCSD SRRU
Please sign in to leave a comment.