Place a real-time APRS map on your web page!
Simply paste the following HTML code on your web page, and you'll have an automatically updating real-time APRS Google map running in minutes. Put the APRS callsign of your car in the he_track variable (replacing Rautauoma, a rescue vessel in Helsinki), and the map will show the position of your car!
<p> <script type="text/javascript"> he_track = "Rautauoma"; // track this callsign </script> <script type="text/javascript" src="//aprs.fi/js/embed.js"> </script> </p>
Important:
The map really does update automatically every few seconds. When any information shown on the map is updated on the APRS-IS, the real-time map will update within seconds. So please, do not use the 'meta refresh' tag to automatically reload a page containing a real-time map. It will only slow down the browser, and place unnecessary load on the server and the network. And it will annoy your page's visitors - if he or she has moved or zoomed the map view, the automatic reload will reset the selected view back to the initial settings.
This map is generated by the HTML code shown above:
Options which can be set in the javascript:
A more complicated example:
<p> <script type="text/javascript"> // latitude and longitude of Miami, Florida he_lat = 25.696; he_lng = -80.174; he_zoom = 10; // zoom out a bit he_maptype = 'h'; // hybrid map // select what to show he_hide_tcp = 1; // do not show Internet stations he_show_aprs = 'w'; // show APRS stations with waypoints he_show_aprs_w = ''; // do not show APRS weather stations he_show_aprs_i = 'p'; // only show the current position of items without track he_show_ais = ''; // do not show AIS ships </script> <script type="text/javascript" src="//aprs.fi/js/embed.js"> </script> </p>
The usual disclaimer:
This service is provided free of charge. There is no warranty. If it breaks, you get to keep both pieces. Please don't abuse the service. Please do not alter the javascript code. Do not try to hide the 'powered by Google', map copyright or aprs.fi tags or links. The embedding functionality is intended for web sites, not for apps duplicating aprs.fi functionality. This is a beta-quality service - the API might change without notice, or the service might end if it causes too much load on the server.
Happy HTML hacking, have fun!