i-Boating : Using leaflet to render a Nautical Chart.



<!DOCTYPE html>
<html>
<head>
    <title>i-Boating : Using leaflet to render a Nautical Chart.</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <style>
      html, body, #map {
        width: 100%;
        height: 100%;
        margin: 0;
      }
    </style>

    <!-- Leaflet -->
    <link rel="stylesheet" href="https://unpkg.com/leaflet@1.5.1/dist/leaflet.css" />
    <script src="https://unpkg.com/leaflet@1.5.1/dist/leaflet.js"></script>

    <!-- Nautical Mapping -->
    <link rel='stylesheet' href='https://fishing-app.gpsnauticalcharts.com/i-boating-fishing-marine-navigation-sdk/5.5/blc-maps.css?rand=1695425337' />
    <script src='https://fishing-app.gpsnauticalcharts.com/i-boating-fishing-marine-navigation-sdk/5.5/blc-maps.js?rand=1695425337'></script>
    

</head>

<body>
<div id="map"></div>

<!-- Leaflet Nautical Adapter -->
<script src="https://fishing-app.gpsnauticalcharts.com/i-boating-fishing-marine-navigation-sdk/5.5/leaflet-blc-adapter.js?rand=1695425337"></script>
<script>
var map = L.map('map').setView([37.8269, -122.3990], 15);

L.marker([37.8269,-122.3990])
    .bindPopup("Hello <b>Leaflet Nautical</b>!<br>Hello, World!")
    .addTo(map)
    .openPopup();

<!--  This will add nautical charts to the map -->
var gl = L.blcGL({
    blc_access_token:'YOUR_ACCESS_TOKEN_HERE'
}).addTo(map);

</script>
</body>
</html>