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 |
$ 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=='
<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.
<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.
<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.
<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
<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.
<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.
<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.
<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.
<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.
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 |
https://www.beans.ai/mapswidget/mapbox.html
?addressOptions=Wwp7CiAgICAgICAgICBhZGRyZXNzOiAiMzEwMCBXIExha2UgU3QsIE1pbm5lYXBvbGlzLCBNTiIsCiAgICAgICAgICB1bml0OiAiMzM0IgogICAgICAgIH0KXQ==
&navOptions=ewogICAgICAgIHBsYXRmb3JtOiAiQVBQTEUiLAogICAgICAgIHVzZXJMb2NhdGlvbjogewogICAgICAgICAgbGF0OiAzNC4xNzc5LAogICAgICAgICAgbG5nOiAtMTEyLjUzMzMKICAgICAgICB9CiAgICAgIH0=
&displayOptions=ewogICAgICAgIGluaXRpYWxNYXA6ICJTVFJFRVQiLAogICAgICAgIHNob3dVbml0U2hhcGU6IHRydWUsCiAgICAgICAgc2hvd1BhdGg6IHRydWUsCiAgICAgICAgcGF0aDogWwogICAgICAgICAgJ0VOVFJBTkNFJywKICAgICAgICAgICdFTEVWQVRPUicsCiAgICAgICAgICAnVU5JVCcKICAgICAgICBdLAogICAgICAgIHNob3dEaXJlY3Rpb25zOiB0cnVlLAogICAgICAgIGluaXRpYWxQb3NpdGlvbjogewogICAgICAgICAgYWRkcmVzczogIjMxMDAgVyBMYWtlIFN0LCBNaW5uZWFwb2xpcywgTU4iCiAgICAgICAgfQogICAgICB9
&apiKeySecret=...beans api key:secret...
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... |
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... |
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...