I'm trying to create a webmap that shows a single point on a map. The point is the location of a GPS device and is refreshed approximately every 10 minutes. The GPS company has provided a public XML endpoint that exports the data I need, but I don't know my way around web programming. The link to the endpoint I'm trying to extract data from is: https://api.findmespot.com/spot-main-web/consumer/rest-api/2.0/public/feed/0BBk2RhP8BxXzRbdRKenMK0rLB4zXNqY2/latest.xml
I could use some guidance in:
- Reading Lat and Long data from the XML endpoint above (I took a shot at it below with jquery but had no luck)
<script>
$(document).ready(function()
{
$.ajax({
type: "GET",
url: "https://api.findmespot.com/spot-main-web/consumer/rest-api/2.0/public/feed/0BBk2RhP8BxXzRbdRKenMK0rLB4zXNqY2/latest.xml"
dataType: "xml",
success: parseXml
});
});
$(this).attr("example")
</script>
- Creating a variable with the lat and long data from the XML subelements.
From there I can add the point to a map using leaflet, but I can't seem to get past step 1.