MapsWidget API v1

Demo Links

Google
https://www.beans.ai/mapswidget/example-google.html
https://www.beans.ai/mapswidget/example-google-inline.html
https://www.beans.ai/mapswidget/example-google-with-multiple.html
https://www.beans.ai/mapswidget/example-google-with-no-3d.html
https://www.beans.ai/mapswidget/example-google-with-multiple-no-3d.html

Mapbox
https://www.beans.ai/mapswidget/example-mapbox.html
https://www.beans.ai/mapswidget/example-mapbox-inline.html
https://www.beans.ai/mapswidget/example-mapbox-with-multiple.html
https://www.beans.ai/mapswidget/example-mapbox-with-no-3d.html
https://www.beans.ai/mapswidget/example-mapbox-with-multiple-no-3d.html

ESRI
https://www.beans.ai/mapswidget/example-esri.html
https://www.beans.ai/mapswidget/example-esri-inline.html
https://www.beans.ai/mapswidget/example-esri-with-multiple.html
https://www.beans.ai/mapswidget/example-esri-with-no-3d.html
https://www.beans.ai/mapswidget/example-esri-with-multiple-no-3d.html

Account Setup

Please register an enterprise account on https://www.beans.ai/enterprise-console. When creating an account, you may use the invite code sent to you in a separate email.

Once you have created an account, a Beans API key and secret is automatically generated for you. Please keep these credentials confidentially and you will need to use them in the integration specification below.

Indoor API

Request

Base Url
GET https://api.beans.ai/enterprise/v2/search/path
Authentication
The Beans Indoor Path API uses a standard authorization header to authenticate client requests. You must sign in and create an enterprise account here to get your key before you access the API. If you use an unauthorized key or do not provide one, you will get a NOT_ALLOWED response.
Once you have your key and secret available, you are required to specify them in the Authorization header of all your requests, as below, where a2V5OnNlY3JldA== is the base64 encoding of the string "key:secret". For more information, see wiki:Basic access authentication

Authorization: Basic a2V5OnNlY3JldA==

Request Parameters
Request Parameters Type? Required? Values
waypoints Semicolon separated quadruple of
Double, Double, Double, String
Yes Quadruples of Lat, Lng, Elevation, Name
findBestSequence Boolean No
preserveFirstStop Boolean No
preserveLastStop Boolean No
Example Request
$ curl -X GET \
'https://api.beans.ai/enterprise/v2/search/path?waypoints=32.8264607729915,-96.84978217271895,3.0,A;32.82701237436884,-96.84987603133914,3.0,C;32.82651059989373,-96.85022429570184,3.0,B;32.82639019340066,-96.84993787453772,3.0,D' \
-H 'Authorization: Basic a2V5OnNlY3JldA=='

Response

Response Object
Response will consist of three arrays: point, leg, and order. The response for the above sample request is below

Integration Overview

The Beans.ai Web Widget works seamlessly across Mapbox, Google Maps, and ESRI JS APIs.

There are two primary ways to integrate the Beans.ai Web Widget.

  1. Library
    In the library implementation, you will code and host the web pages necessary to render the widget. This is ideal for an integration where the widget lies within your website and is embedded in an existing page. The widget allows far more customization than the Beans.ai hosted iFrame/ Web View integration.
  2. Hosted by Beans.ai
    In the Beans.ai hosted implementation, you will simply link to the widget hosted on the Beans.ai website and embed it either within your website in iframe, or as an external link from your website, or within your mobile app as a Web View using URL query parameters to specify the data you want to display.

Configuration

Mapbox Integration
Headers
        
<link
  href="https://www.beans.ai/mapswidget/css/mapswidget-1.0.4.css"
  rel="stylesheet"
/>
<link
  href="https://api.tiles.mapbox.com/mapbox-gl-js/v2.9.1/mapbox-gl.css"
  rel="stylesheet"
/>
        
End of body
        
<script type="text/javascript"
  src="https://api.tiles.mapbox.com/mapbox-gl-js/v2.9.1/mapbox-gl.js"
></script>
<script type="text/javascript"
  src="https://www.beans.ai/mapswidget/js/mapswidget-1.0.4.js"
></script>
        
Container
        
<div id="beans-maps-1" style="width: 50vw; height: 60vh;"></div>
        
👉 Please ensure that the container div has a predefined height and width. If the size is calculated on the fly, that may lead to incorrect rendering.

Initializing
The following is an example of the code that must be added to the body right after the two js files above:

Basic Rendering
        
<script type="text/javascript">
  var be = new BeansMap();
  be.render(
    "beans-maps-1",
    "...beans api key:secret...",
    [
      {
        address: "3815 N 16th St, Phoenix, AZ",
        unit: "251"
      }
    ],
    // Nav Options,
    {},
    // Display Options
    {},
    // Callback Options
    {}
  );
</script>
        
👉 Please ensure that you specify the Beans api key secret.

Customizations
        
<script type="text/javascript">
  var be = new BeansMap();
  be.render(
    "beans-maps-1",
    "...beans api key:secret...",
    [
      {
        address: "1200 Dale Ave, Mountain View, CA",
        unit: "43",
        options: {
          tiles: {
            keybox: {
              // [Optional] Set the text to show on the tiles.
              text: "#9112",

              // [Optional] Set the icon for the tile. See
              // https://storage.googleapis.com/beans-mobile-resources/marker-note-icons/parking_0.png
              // for size and format.
              iconUrl: "https://storage.googleapis.com/beans-mobile-resources/marker-note-icons/..."
            },
            entrance: {
              text: "#9111"
            },
            elevation: {
              text: "Floor 3"
            },
            parking: {
              text: "Street"
            }
          },
          markers: {
            // [Optional] Set display to false to hide all the markers. Default true.
            display: true,
            keybox: {
              // [Optional] Set display to true to show the marker if all the markers are hidden
              // [Optional] Set display to false to hide the marker if all the markers are visible
              display: true,

              // [Optional] Set the text to show on the markers.
              text: "#9112"
            },
            entrance: {
              text: "#9111",

              // [Optional] Set the icon for the marker. See
              // https://storage.googleapis.com/beans-mobile-resources/marker-note-icons/parking_0.png
              // for size and format.
              iconUrl: "https://storage.googleapis.com/beans-mobile-resources/marker-note-icons/..."
            },
            elevation: {
              text: "Floor 3"
            },
            parking: {
              text: "Street"
            }
          },
          poi: [
            {
              // [Required] Set the POI location.
              location: {
                lat: 33.63427078772915,
                lng: -111.86407107998963
              },

              // [Required] Set the POI type.
              name: "CARWASH",

              // [Optional] Set the icon for the POI. See
              // https://storage.googleapis.com/beans-mobile-resources/marker-note-icons/parking_0.png
              // for size and format.
              iconUrl: "https://storage.googleapis.com/beans-mobile-resources/marker-note-icons/..."
            },
            {
              // [Optional] Set display to false to hide specific POIs that are a part of the Beans data set.
              display: false,

              // [Required] Set the POI type.
              name: "TRASH"
            },
            {
              display: false,
              name: "ALL"
            }
          ]
        }
      }
    ],
    {
      // [Optional] Set the location of the user to a fixed position for the navigation to work.
      userLocation: {
        lat: 37.450469700667234,
        lng: -122.16778683875827
      },
      // [Optional] Alteratenely, set the user location to pick the current live location the user.
      // userLocation: "LIVE",

      // [Optional] Set the default maps app to open on clicking the navigate button.
      platform: "APPLE",

      // [Optional] Hide the navigate button
      hideNavigateButton: true,

      // [Optional] Hide the "my location" button.
      hideMyLocationButton: true
    },
    {
      // [Optional] Set the default view to satellite.
      initialMap: "SATELLITE",

      // [Optional] Set a customized mapbox style.
      mapStyle: "mapbox://styles/mapbox/streets-v11",

      // [Optional] Hide the beans card.
      hideBeansCard: true,

      // [Optional] Hide the floor selector.
      hideFloorSelector: true,

      // [Optional] Hide the toggle satellite view button.
      hideSatelliteButton: true,

      // [Optional] Show the unit, entrance, elevator tiles.
      showTiles: true,

      // [Optional] Show the distance links.
      showLinks: true,

      // [Optional] Show unit outline.
      showUnitShape: true,

      // [Optional] Show the multi-unit selector in the card.
      showUnitList: true,

      // [Optional] Show building outline.
      showBuildingShape: false,

      // [Optional] Show directions in the card.
      showDirections: true,

      // [Optional] Show navigation path.
      showPath: true,

      // [Optional] Set the order of the path.
      path: [
        "PARKING",
        "ENTRANCE",
        "ELEVATOR",
        "UNIT"
      ]
    },
    // Callback Options
    {
      onSatelliteClick: (type) => {}, // STREET or SATELLITE
      onMylocationClick: (isFound, {lat: ..., lng: ...}) => {},
      onPOINavigateClick: (searchQuery) => {},
      onShareButtonClick: () => {},
      onHelpButtonClick: () => {},
      onPOIClick: (markerName) => {},
      onMinimizeCard: () => {},
      onMaximizeCard: () => {},
      onSelect: (onClickData) => {}
    }
  );
</script>
        
👉 Please ensure that you specify the Beans api key secret.

BeansMap.prototype.render takes the following parameters, in order:
  1. ID of the div that the widget should render within
  2. Beans api “key:secret”
  3. Array of Display objects, where each Display object consists of:
    1. Street address.
    2. Unit address. Leave empty if no unit number is required.
    3. Options. Every field in Options is optional, and provides mechanisms to override different parts of the display. You may pass
      1. Tiles
      2. Markers
      3. Additional points of interest, which must have the name from the following strings: SWIMMINGPOOL, CARWASH, TENNIS, LAUNDRY, OFFICE, CLUBHOUSE, BBQ, MAILROOM, PACKAGELOCKER, CYCLESTORAGE, GYM
  4. Navigation options. Every field in Navigation Options is optional. You may pass
    1. UserLocation
    2. Platform
    3. HideNavigateButton
  5. Display options. Every field in Display Options is optional. You may pass
    1. InitialMap
    2. MapSyle
    3. HideNavigateButton
    4. HideBeansCard
    5. HideFloorSelector
    6. ShowTiles
    7. ShowLinks
    8. ShowDirections
    9. ShowUnitShape
    10. ShowUnitList
    11. ShowBuildingShape
    12. ShowPath
    13. Path
Google Maps Integration
Headers
        
<link
  href="https://www.beans.ai/mapswidget/css/mapswidget-1.0.4.css"
  rel="stylesheet"
/>
        
End of body
        
<script type="text/javascript"
  src="https://www.beans.ai/mapswidget/js/mapswidget-1.0.4.js"
></script>
<script async defer
  src="https://maps.googleapis.com/maps/api/js?key=...&callback=initMap"
></script>
        
👉 Please ensure that you specify as your Google Maps API key when adding the Google Maps library to your code. Container
        
<div id="beans-maps-1" style="width: 50vw; height: 60vh;"></div>
        
Initializing
The following is an example of the code that must be added to the body right after the two js files above:

Basic Rendering
        
<script type="text/javascript">
  function initMap() {
    var be = new BeansMap();
    be.render(
      "beans-maps-1",
      "...beans api key:secret...",
      [
        {
          address: "3815 N 16th St, Phoenix, AZ",
          unit: "251"
        }
      ],
      // Nav Options,
      {},
      // Display Options
      {},
      // Callback Options
      {}
    );
  }
</script>
        
👉 Please ensure that you specify the Beans api key secret in the arguments to the render method. 👉 Please ensure that your calls to the Beans widget are wrapped inside Google Maps’ callback function.

Customizations
        
<script type="text/javascript">
  function initMap() {
    var be = new BeansMap();
    be.render(
      "beans-maps-1",
      "...beans api key:secret...",
      [
        {
          address: "1200 Dale Ave, Mountain View, CA",
          unit: "43",
          options: {
            tiles: {
              keybox: {
                // [Optional] Set the text to show on the tiles.
                text: "#9112",

                // [Optional] Set the icon for the tile. See
                // https://storage.googleapis.com/beans-mobile-resources/marker-note-icons/parking_0.png
                // for size and format.
                iconUrl: "https://storage.googleapis.com/beans-mobile-resources/marker-note-icons/..."
              },
              entrance: {
                text: "#9111"
              },
              elevation: {
                text: "Floor 3"
              },
              parking: {
                text: "Street"
              }
            },
            markers: {
              // [Optional] Set display to false to hide all the markers. Default true.
              display: true,
              keybox: {
                // [Optional] Set display to true to show the marker if all the markers are hidden
                // [Optional] Set display to false to hide the marker if all the markers are visible
                display: true,

                // [Optional] Set the text to show on the markers.
                text: "#9112"
              },
              entrance: {
                text: "#9111",

                // [Optional] Set the icon for the marker. See
                // https://storage.googleapis.com/beans-mobile-resources/marker-note-icons/parking_0.png
                // for size and format.
                iconUrl: "https://storage.googleapis.com/beans-mobile-resources/marker-note-icons/..."
              },
              elevation: {
                text: "Floor 3"
              },
              parking: {
                text: "Street"
              }
            },
            poi: [
              {
                // [Required] Set the POI location.
                location: {
                  lat: 33.63427078772915,
                  lng: -111.86407107998963
                },

                // [Required] Set the POI type.
                name: "CARWASH",

                // [Optional] Set the icon for the POI. See
                // https://storage.googleapis.com/beans-mobile-resources/marker-note-icons/parking_0.png
                // for size and format.
                iconUrl: "https://storage.googleapis.com/beans-mobile-resources/marker-note-icons/..."
              },
              {
                // [Optional] Set display to false to hide specific POIs that are a part of the Beans data set.
                display: false,

                // [Required] Set the POI type.
                name: "TRASH"
              },
              {
                display: false,
                name: "ALL"
              }
            ]
          }
        }
      ],
      {
        // [Optional] Set the location of the user to a fixed position for the navigation to work.
        userLocation: "LIVE",

        // [Optional] Set the default maps app to open on clicking the navigate button
        platform: "APPLE",

        // [Optional] Hide the navigate button
        hideNavigateButton: true,

        // [Optional] Hide the "my location" button.
        hideMyLocationButton: true
      },
      {
        // [Optional] Set the default view to satellite.
        initialMap: "SATELLITE",

        // [Optional] Set a customized Google style.
        mapStyle: [
          {
            "elementType": "labels",
            "stylers": [
              {
                "visibility": "off"
              }
            ]
          },
          {
            "featureType": "administrative.land_parcel",
            "stylers": [
              {
                "visibility": "off"
              }
            ]
          },
          {
            "featureType": "administrative.neighborhood",
            "stylers": [
              {
                "visibility": "off"
              }
            ]
          }
        ],

        // [Optional] Hide the beans card.
        hideBeansCard: true,

        // [Optional] Hide the floor selector.
        hideFloorSelector: true,

        // [Optional] Hide the toggle satellite view button.
        hideSatelliteButton: true,

        // [Optional] Show the unit, entrance, elevator tiles.
        showTiles: true,

        // [Optional] Show the distance links.
        showLinks: true,

        // [Optional] Show unit outline.
        showUnitShape: true,

        // [Optional] Show the multi-unit selector in the card.
        showUnitList: true,

        // [Optional] Show building outline.
        showBuildingShape: true,

        // [Optional] Show directions in the card.
        showDirections: true,

        // [Optional] Show navigation path.
        showPath: true,

        // [Optional] Set the order of the path.
        path: [
          "PARKING",
          "ENTRANCE",
          "ELEVATOR",
          "UNIT"
        ]
      },
      // Callback Options
      {
        onSatelliteClick: (type) => {}, // STREET or SATELLITE
        onMylocationClick: (isFound, {lat: ..., lng: ...}) => {},
        onPOINavigateClick: (searchQuery) => {},
        onShareButtonClick: () => {},
        onHelpButtonClick: () => {},
        onPOIClick: (markerName) => {},
        onMinimizeCard: () => {},
        onMaximizeCard: () => {},
        onSelect: (onClickData) => {}
      }
    );
  }
</script>
        
👉Please ensure that you specify the Beans api key secret in the arguments to the render method. 👉Please ensure that your calls to the Beans widget are wrapped inside Google Maps’ callback function.

BeansMap.prototype.render takes the following parameters, in order:
  1. ID of the div that the widget should render within
  2. Beans api “key:secret”
  3. Array of Display objects, where each Display object consists of:
    1. Street address.
    2. Unit address. Leave empty if no unit number is required.
    3. Options. Every field in Options is optional, and provides mechanisms to override different parts of the display. You may pass
      1. Tiles
      2. Markers
      3. Additional points of interest, which must have the name from the following strings: SWIMMINGPOOL, CARWASH, TENNIS, LAUNDRY, OFFICE, CLUBHOUSE, BBQ, MAILROOM, PACKAGELOCKER, CYCLESTORAGE, GYM
  4. Navigation options. Every field in Navigation Options is optional. You may pass
    1. UserLocation
    2. Platform
    3. HideNavigateButton
  5. Display options. Every field in Display Options is optional. You may pass
    1. InitialMap
    2. MapSyle
    3. HideNavigateButton
    4. HideBeansCard
    5. HideFloorSelector
    6. ShowTiles
    7. ShowLinks
    8. ShowDirections
    9. ShowUnitShape
    10. ShowUnitList
    11. ShowBuildingShape
    12. ShowPath
    13. Path
ESRI Integration
Headers
      
<link
href="https://www.beans.ai/mapswidget/css/mapswidget-1.0.4.css"
rel="stylesheet"
/>
<link
href="https://js.arcgis.com/4.23/esri/themes/light/main.css"
rel="stylesheet"
/>
      
End of body
      
<script type="text/javascript"
src="https://js.arcgis.com/4.23/"
></script>
<script type="text/javascript"
src="https://www.beans.ai/mapswidget/js/mapswidget-1.0.4.js"
></script>
      
Container
      
<div id="beans-maps-1" style="width: 50vw; height: 60vh;"></div>
      
👉 Please ensure that the container div has a predefined height and width. If the size is calculated on the fly, that may lead to incorrect rendering.

Initializing
The following is an example of the code that must be added to the body right after the two js files above:

Basic Rendering
      
<script type="text/javascript">
var be = new BeansMap();
be.render(
  "beans-maps-1",
  "...beans api key:secret...",
  [
    {
      address: "3815 N 16th St, Phoenix, AZ",
      unit: "251"
    }
  ],
  // Nav Options,
  {},
  // Display Options
  {},
  // Callback Options
  {}
);
</script>
      
👉 Please ensure that you specify the Beans api key secret.

Customizations
      
<script type="text/javascript">
var be = new BeansMap();
be.render(
  "beans-maps-1",
  "...beans api key:secret...",
  [
    {
      address: "1200 Dale Ave, Mountain View, CA",
      unit: "43",
      options: {
        // [Optional] If unit list is displayed, the lines to display below each unit number.
        onPreviewData: [
          {
            value: "3 Bed / 2 Bath / 1500 sq. ft."
          },
          {
            value: "$3200/ mo"
          },
          {
            value: "Available Now"
          }
        ],
        // [Optional] Content used for filtering in the unit list, and to display in the box when the unit is selected.
        onClickData: {
          name: "43",
          bed: 3,
          bath: 2,
          sqft: 1500,
          rent: 3200,
          floorplanImg: "..."
        },
        // [Optional] Design of the unit.
        unitShape: {
          fillColor: '#427B01',
          fillOpacity: 1.0,
          strokeWeight: 1.0,
          strokeOpacity: 1.0,
          strokeColor: '#ffffff'
        },
        tiles: {
          keybox: {
            // [Optional] Set the text to show on the tiles.
            text: "#9112",

            // [Optional] Set the icon for the tile. See
            // https://storage.googleapis.com/beans-mobile-resources/marker-note-icons/parking_0.png
            // for size and format.
            iconUrl: "https://storage.googleapis.com/beans-mobile-resources/marker-note-icons/..."
          },
          entrance: {
            text: "#9111"
          },
          elevation: {
            text: "Floor 3"
          },
          parking: {
            text: "Street"
          }
        },
        markers: {
          // [Optional] Set display to false to hide all the markers. Default true.
          display: true,
          keybox: {
            // [Optional] Set display to true to show the marker if all the markers are hidden
            // [Optional] Set display to false to hide the marker if all the markers are visible
            display: true,

            // [Optional] Set the text to show on the markers.
            text: "#9112"
          },
          entrance: {
            text: "#9111",

            // [Optional] Set the icon for the marker. See
            // https://storage.googleapis.com/beans-mobile-resources/marker-note-icons/parking_0.png
            // for size and format.
            iconUrl: "https://storage.googleapis.com/beans-mobile-resources/marker-note-icons/..."
          },
          elevation: {
            text: "Floor 3"
          },
          parking: {
            text: "Street"
          }
        },
        poi: [
          {
            // [Required] Set the POI location.
            location: {
              lat: 33.63427078772915,
              lng: -111.86407107998963
            },

            // [Required] Set the POI type.
            name: "CARWASH",

            // [Optional] Set the icon for the POI. See
            // https://storage.googleapis.com/beans-mobile-resources/marker-note-icons/parking_0.png
            // for size and format.
            iconUrl: "https://storage.googleapis.com/beans-mobile-resources/marker-note-icons/..."
          },
          {
            // [Optional] Set display to false to hide specific POIs that are a part of the Beans data set.
            display: false,

            // [Required] Set the POI type.
            name: "TRASH"
          },
          {
            display: false,
            name: "ALL"
          }
        ]
      }
    }
  ],
  {
    // [Optional] Set the location of the user to a fixed position for the navigation to work.
    userLocation: {
      lat: 37.450469700667234,
      lng: -122.16778683875827
    },
    // [Optional] Alteratenely, set the user location to pick the current live location the user.
    // userLocation: "LIVE",

    // [Optional] Set the default maps app to open on clicking the navigate button.
    platform: "APPLE",

    // [Optional] Hide the navigate button
    hideNavigateButton: true,

    // [Optional] Hide the "my location" button.
    hideMyLocationButton: true
  },
  {
    // [Optional] Set the default view to satellite.
    initialMap: "SATELLITE",

    // [Optional] Set a customized mapbox style.
    mapStyle: "mapbox://styles/mapbox/streets-v11",

    // [Optional] Hide the beans card.
    hideBeansCard: true,

    // [Optional] Hide the toggle satellite view button.
    hideSatelliteButton: true,

    // [Optional] Show the unit, entrance, elevator tiles.
    showTiles: true,

    // [Optional] Show the distance links.
    showLinks: true,

    // [Optional] Show unit outline.
    showUnitShape: true,

    // [Optional] Show the multi-unit selector in the card.
    showUnitList: true,

    // [Optional] Show the 3D map with real-ground elevation.
    useGroundElevation: true,

    // [Optional] Offset the building's base by this elevation.
    // Must be specified when useGroundElevation is true.
    offsetGroundElevation: 3,

    // [Optional] Enable neighborgood buildings button.
    showNeighbors: true,

    // [Optional] Initial tilt of the camera. 0 is looking down vertically.
    initialTilt: 30,

    // [Optional] Initial height of the camera.
    initialZ: 400,

    // [Optional] Initial view direction of the camera. 0 is North.
    initialHeading: 270,

    // [Optional] Show building outline.
    showBuildingShape: true,

    // [Optional] Show directions in the card.
    showDirections: true,

    // [Optional] Show navigation path.
    showPath: true,

    // [Optional] Set the order of the path.
    path: [
      "PARKING",
      "ENTRANCE",
      "ELEVATOR",
      "UNIT"
    ],

    // [Optional] Default design of every unit.
    unitShape: {
      fillColor: '#ffffff',
      fillOpacity: 0.5,
      strokeWeight: 1,
      strokeOpacity: 0.2,
      strokeColor: '#000000',
      fillColorOnShadowMode: '#ffffff',
      fillOpacityOnShadowMode: 1.0,
      fillColorOnNeighborMode: '#B7E5A6',
      fillOpacityOnNeighborMode: 1.0
    },

    // [Optional] Design of every unit on the selected floor.
    selectedUnitShapeSameFloor: {
      fillColor: '#427B01',
      fillOpacity: 1.0,
      strokeWeight: 1.0,
      strokeOpacity: 1.0,
      strokeColor: '#ffffff'
    },

    // [Optional] Design of the selected unit.
    selectedUnitShape: {
      fillColor: '#FFB20F',
      fillOpacity: 1.0,
      strokeWeight: 1.0,
      strokeOpacity: 1.0,
      strokeColor: '#ffffff'
    },


    // [Optional] Design of every unit that can be selected.
    selectableUnitShape: {
      fillColor: '#427B01',
      fillOpacity: 1.0,
      strokeWeight: 1.0,
      strokeOpacity: 1.0,
      strokeColor: '#ffffff'
    },

    // [Optional] Design of other buildings when neighborhood is viewed.
    neighborShape: {
      fillColor: '#ffffff',
      fillOpacity: 1.0,
      strokeWeight: 1.0,
      strokeOpacity: 0.2,
      strokeColor: '#000000'
    }
  },
  // Callback Options
  {
    onSatelliteClick: (type) => {}, // STREET or SATELLITE
    onMylocationClick: (isFound, {lat: ..., lng: ...}) => {},
    onPOINavigateClick: (searchQuery) => {},
    onShareButtonClick: () => {},
    onHelpButtonClick: () => {},
    onPOIClick: (markerName) => {},
    onMinimizeCard: () => {},
    onMaximizeCard: () => {},
    onSelect: (onClickData) => {}
  }
);
</script>
      
👉 Please ensure that you specify the Beans api key secret.

BeansMap.prototype.render takes the following parameters, in order:
  1. ID of the div that the widget should render within
  2. Beans api “key:secret”
  3. Array of Display objects, where each Display object consists of:
    1. Street address.
    2. Unit address. Leave empty if no unit number is required.
    3. Options. Every field in Options is optional, and provides mechanisms to override different parts of the display. You may pass
      1. OnPreviewData
      2. OnClickData
      3. Tiles
      4. Markers
      5. Additional points of interest, which must have the name from the following strings: SWIMMINGPOOL, CARWASH, TENNIS, LAUNDRY, OFFICE, CLUBHOUSE, BBQ, MAILROOM, PACKAGELOCKER, CYCLESTORAGE, GYM
  4. Navigation options. Every field in Navigation Options is optional. You may pass
    1. UserLocation
    2. Platform
    3. HideNavigateButton
  5. Display options. Every field in Display Options is optional. You may pass
    1. InitialMap
    2. MapSyle
    3. HideNavigateButton
    4. HideBeansCard
    5. HideFloorSelector
    6. ShowTiles
    7. ShowLinks
    8. ShowDirections
    9. ShowUnitShape
    10. ShowUnitList
    11. UseGroundElevation
    12. OffsetGroundElevation
    13. ShowNeighbors
    14. InitialTilt
    15. InitialZ
    16. InitialHeading
    17. ShowBuildingShape
    18. ShowPath
    19. Path
    20. UnitShape
    21. SelectedUnitShapeSameFloor
    22. SelectedUnitShape
    23. SelectableUnitShape
    24. NeighborShape
Base Url
Mapbox Integration
https://www.beans.ai/mapswidget/mapbox.html
https://www.beans.ai/mapswidget/mapbox-with-nav.html
Google Integration
https://www.beans.ai/mapswidget/google.html
https://www.beans.ai/mapswidget/google-with-nav.html
Library-like Integration
Query parameters
Parameter Name Required Type
apiKeySecret yes String:String
addressOptions Yes base64 encoded String of address options from the library integration
navOptions No base64 encoded String of navigation options from the library integration
displayOptions No base64 encoded String of display options from the library integration
Example
Mapbox
      
https://www.beans.ai/mapswidget/mapbox.html
?addressOptions=Wwp7CiAgICAgICAgICBhZGRyZXNzOiAiMzEwMCBXIExha2UgU3QsIE1pbm5lYXBvbGlzLCBNTiIsCiAgICAgICAgICB1bml0OiAiMzM0IgogICAgICAgIH0KXQ==
&navOptions=ewogICAgICAgIHBsYXRmb3JtOiAiQVBQTEUiLAogICAgICAgIHVzZXJMb2NhdGlvbjogewogICAgICAgICAgbGF0OiAzNC4xNzc5LAogICAgICAgICAgbG5nOiAtMTEyLjUzMzMKICAgICAgICB9CiAgICAgIH0=
&displayOptions=ewogICAgICAgIGluaXRpYWxNYXA6ICJTVFJFRVQiLAogICAgICAgIHNob3dVbml0U2hhcGU6IHRydWUsCiAgICAgICAgc2hvd1BhdGg6IHRydWUsCiAgICAgICAgcGF0aDogWwogICAgICAgICAgJ0VOVFJBTkNFJywKICAgICAgICAgICdFTEVWQVRPUicsCiAgICAgICAgICAnVU5JVCcKICAgICAgICBdLAogICAgICAgIHNob3dEaXJlY3Rpb25zOiB0cnVlLAogICAgICAgIGluaXRpYWxQb3NpdGlvbjogewogICAgICAgICAgYWRkcmVzczogIjMxMDAgVyBMYWtlIFN0LCBNaW5uZWFwb2xpcywgTU4iCiAgICAgICAgfQogICAgICB9
&apiKeySecret=...beans api key:secret...
      
Parameterized Implementation (limited functionality)
Query parameters
Single Result
Parameter Name Required Type
apiKeySecret yes String:String
address Yes String
unit No String
entrance.text No String
elevation.text No String
parking.text No String
card No Boolean
links No Boolean
markers No String,String,...
additionalPoints No Double;Double;String|...†
userLocation No LIVE|Double,Double
initialMap No One of STREET or SATTELITE
platform No One of APPLE or GOOGLE
showDirections No Boolean
showUnitShape No Boolean
showBuildingShape No Boolean
showPath No Boolean
path No String,String...
†Pipe separated list of Semicolon separated triple of lat, lng, and PointType where PointType is one of SWIMMINGPOOL, CARWASH, TENNIS, LAUNDRY, OFFICE, CLUBHOUSE, BBQ, MAILROOM, PACKAGELOCKER, CYCLESTORAGE, GYM

Multiple Results
Parameter Name Required Type
apiKeySecret yes String:String
addressPoints Yes String;String;String;String;String|...‡
additionalPoints No Double;Double;String|...†
card No Boolean
links No Boolean
markers No String,String,...
userLocation No LIVE|Double,Double
initialMap No One of STREET or SATTELITE
platform No One of APPLE or GOOGLE
showDirections No Boolean
showUnitShape No Boolean
showBuildingShape No Boolean
showPath No Boolean
path No String,String...
‡Pipe separated list of Semicolon separated list of address, unit, entrance.text, elevation.text, and parking.text
†Pipe separated list of Semicolon separated triple of lat, lng, and PointType where PointType is one of SWIMMINGPOOL, CARWASH, TENNIS, LAUNDRY, OFFICE, CLUBHOUSE, BBQ, MAILROOM, PACKAGELOCKER, CYCLESTORAGE, GYM
Example
Mapbox
      
https://www.beans.ai/mapswidget/mapbox.html
?address=1200+Dale+Ave,+Mountain+View,+CA+94043
&unit=43
&entrance.text=9111
&elevation.text=Floor+3
&additionalPoints=33.63427078772915,-111.86407107998963,CARWASH
&apiKeySecret=...beans api key:secret...
      
Mapbox with Nav
      
https://www.beans.ai/mapswidget/mapbox-with-nav.html
?address=1200+Dale+Ave,+Mountain+View,+CA+94043
&unit=43
&entrance.text=9111
&elevation.text=Floor+3
&additionalPoints=33.63427078772915,-111.86407107998963,CARWASH
&apiKeySecret=...beans api key:secret...
&userLocation=37.450469700667234,-122.16778683875827
&platform=APPLE
      
Google
      
https://www.beans.ai/mapswidget/google.html
?address=1200+Dale+Ave,+Mountain+View,+CA+94043
&unit=43
&entrance.text=9111
&elevation.text=Floor+3
&additionalPoints=33.63427078772915,-111.86407107998963,CARWASH
&apiKeySecret=...beans api key:secret...
      
Google with Nav
      
https://www.beans.ai/mapswidget/google-with-nav.html
?address=1200+Dale+Ave,+Mountain+View,+CA+94043
&unit=43
&entrance.text=9111
&elevation.text=Floor+3
&additionalPoints=33.63427078772915,-111.86407107998963,CARWASH
&userLocation=37.450469700667234,-122.16778683875827
&platform=GOOGLE
&apiKeySecret=...beans api key:secret...