Free Live Map Javascript for your Marine Traffic

Live map of marine traffic for the status of your company's ships, which can be applied to your website. With the Javascript code below, you can install marine traffic maps on your own website. It's easy to do this by inserting the following line of code into the HTML of your web page, at the point where the map will be displayed: or if you want to configure the map dimensions, center area, zoom level and even the positions of your company's ships that you want to observe, use the following code and adjust the default value
the following is the script code:

<script type="text/javascript" src="http://www.marinetraffic.com/js/embed.js"></script>
<script type="text/javascript">
width='100%'; // the width of the embedded map in pixels or percentage
heights='450'; // the height of the embedded map in pixels or percentage
border='1'; // the width of the border around the map (zero means no border)
shownames='false'; // to display ship names on the map (true or false)
latitude='37.4460'; // the latitude of the center of the map, in decimal degrees
longitude='24.9467'; // the longitude of the center of the map, in decimal degrees
zoom='9'; // the zoom level of the map (values ​​between 2 and 17)
maptype='1'; // use 0 for Normal Map, 1 for Satellite
trackvessel='0'; // MMSI of a vessel (note: vessel will be displayed only if within range of the system) - overrides "zoom" option
fleet=''; // the registered email address of a user-defined fleet (user's default fleet is used) - overrides "zoom" option
</script>

You can set the width and height of the map/map, as well as add ship names by changing the shownames status to true, and setting the map/map display according to your long lat area. And you can also display a normal map view or a satellite map by changing the maptype value
In the program below latitude and longitude, I changed it to the latitude and longitude of the Indonesian region.

 latitude='6.1750';
longitude='106.8283';

No comments:

Post a Comment