UI Language

Note that the UI and the map are distinct from each other when presenting a language. To show a map with a specific language, a special venue id is needed which incorporates the language id. Speak to your account manager should you require a map in a specific language or contact support.

To change the UI language, simply call "setLanguage" after the loading the map as shown in the code sample below:

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

	<head>
		<script type="module">

			import LMInit from 'https://maps.locuslabs.com/sdk/LocusMapsSDK.js'

			const config = {
				venueId: 'lax',
				accountId: 'A11F4Y6SZRXH4X',
				headless: false,
				theme: {colors: 
						{widgetText: "#FF0000",    // red 
						 primaryText: "#FFA500"}}  // orange 
			}

			window.LMInit = LMInit
			LMInit.setLogging(true)
			LMInit.newMap('.mymap', config)
				.then(m => { 

					window.map = m;
					window.map.setLanguage("es"); })
				.catch(e => console.error('Error initializing map: ', e))

		</script>
		<style>
			html, body, .mymap {
				height: 100%; margin: 0; padding: 0;
			}
		</style>
	</head>

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

</html>