Adding a prop indoors

Add a prop to an indoor map.

<!DOCTYPE HTML>
<html>
  <head>
    <script src="https://unpkg.com/wrld.js@1.x.x"></script>
    <link href="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.0.1/leaflet.css" rel="stylesheet" />
  </head>
  
  <body>
  <div style="position: relative">
  <style>
      #floorButtons {
        position: absolute;
        z-index: 20;
      }

      #floorButtons button {
        display: block;
        width: 100%;
      }
  </style>

  <div style="position: relative">
    <div id="floorButtons">
      <button type="button" onclick="topFloor()">Top Floor</button>
      <button type="button" onclick="moveUp()">Move Up</button>
      <button type="button" onclick="moveDown()">Move Down</button>
      <button type="button" onclick="bottomFloor()">Bottom Floor</button>
      <button type="button" onclick="exitIndoors()">Exit</button>
    </div>
    <div id="map" style="height: 400px"></div>
  </div>

  <script>
    var map = Wrld.map("map", "your_api_key_here", {
      center: [37.782084, -122.404578],
      zoom: 17,
      indoorsEnabled: true
    });

    var propLocation = Wrld.latLng(37.782084, -122.404578);
    var numberOfFloors = 5;

    for (var floorId = 0; floorId < numberOfFloors; ++floorId) {
    Wrld.prop("my_prop_" + floorId, "duck", propLocation, {
        indoorMapId: "intercontinental_hotel_8628",
        indoorMapFloorId: floorId,
        headingDegrees: 90
      }).addTo(map);
    }

    function topFloor() {
      var indoorMap = map.indoors.getActiveIndoorMap();

      if (indoorMap) {
        map.indoors.setFloor(indoorMap.getFloorCount() - 1);
      }
    }

    function moveUp() {
      map.indoors.moveUp();
    }

    function moveDown() {
      map.indoors.moveDown();
    }

    function bottomFloor() {
      map.indoors.setFloor(0);
    }

    function exitIndoors() {
      map.indoors.exit();
    }
  </script>

  </div>
  </body>
</html>
v1.1.0