General Searches

The sample shows how to perform a programmatic search and inspect the results.

Organizing your code

The Getting Started section details various SDK installation options depending on your requirements. The sample code below is based on a base use case of a plain html page and the ES6 module format.

Performing a search and inspecting the results

The code below shows how to perform a search for "restaurants", including requesting details for all results and then iterate over each result using the "search" command:

<!DOCTYPE html>
<html lang="en">

		<script type="module">

			import LMInit from ''

			const config = {
				venueId: 'lax',
				accountId: 'A11F4Y6SZRXH4X',
				headless: false

			window.LMInit = LMInit
			LMInit.newMap('.mymap', config)
				.then(m => { = m;
					// Pass "true" to get POI details, else only ids are returned"restaurant", true).then(results => {

						console.log("*** Search Results ***");
						var result;
						for (result of results) {

							console.log("Id:", result.poiId);
							console.log("Position:", result.position);
				.catch(e => console.error('Error initializing map: ', e))

			html, body, .mymap {
				height: 100%; margin: 0; padding: 0;

		<div class="mymap" style="height: 100%;"></div>



The following is an extract of the console output of the above code:

Name: – "Osteria by Fabio Viviani"
Id: – "921" (63.js, line 294)
Position: – {floorId: "lax-south-departures", latitude: 33.941206, longitude: -118.401776, …} 
{floorId: "lax-south-departures", latitude: 33.941206, longitude: -118.401776, structureName: "Terminals 4-8", buildingId: "lax-south", …}Object

Name: – "Cantina Laredo"
Id: – "934" 
Position: – {floorId: "lax-tbit-baggageclaim", latitude: 33.943253, longitude: -118.408665, …}
{floorId: "lax-tbit-baggageclaim", latitude: 33.943253, longitude: -118.408665, structureName: "Terminal B", buildingId: "lax-tbit", …}Object