
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Combitrip API - Maps: Shapes</title>
</head>
<body>
<div id="osm-map" style="width: 100%; height: 100%;"></div>

<script src="https://code.jquery.com/jquery-2.1.3.min.js"></script>
<script src="https://www.combitrip.org/api/public/combitrip.maps.min.js?key=32a61ca69e22441db052df11ab8ba02b"></script>

<script>
    new ABOSM("osm-map", {
        center: [52.248624, 4.669728],
        zoom: 10
    }).ready(function (inst) {
        var point_a = [52.248624, 4.669728], point_b = [52.338871, 4.825088];

        var line = inst.polyline(point_a, point_b, {color: '#85a9dd', weight: 4});

        var dashed_line = inst.polyline([52.287063,4.753504], [52.293782,4.857877], {
            color: '#b700ea',
            weight: 4,
            dashLength: 10,
            textOptions: {
                text: 'dashed example!'
            }
        });

        var circle = inst.circle(point_a, {
            unique: 'mycircle',
            color: 'red',
            fillColor: '#f03',
            fillOpacity: 0.5,
            radius: 500
        });

        var rectangle = inst.rectangle([[52.338871, 4.825088], [52.308871, 4.805088]], {
            unique: 'myrectangle',
            weight: 1,
            color: 'blue',
            fillColor: '#0004ff',
            fillOpacity: 0.5
        });

        var polygon = inst.polygon([[52.311627, 4.684182], [52.303231, 4.678341], [52.297562, 4.695176], [52.312887, 4.703077], [52.311627, 4.684182]], {
            unique: 'mypolygon',
            weight: 1,
            color: 'yellow',
            fillColor: '#fcb601',
            fillOpacity: 0.3
        });

        // create the group
        var group = new L.featureGroup([line, dashed_line, circle, rectangle, polygon]);

        inst.fitBounds(group);
    });
</script>

</body>