initCanvasMode
A new instance for 2D light map. This mode is fatest to load than 3D mode.
Parameters
Name | Type | Description |
---|---|---|
token | string | The token used for loading the map. Can be found in our bakcoffice webapp |
culture | string | (optional) The language used (Default is 'fr') |
apiUrl | string | (optional) The URL environment (default is PROD 'https://api.findnorder.com/') |
Result
Return true or false if SDK can't init
Example
x
const fnoToken = "<YOUR-FNO-TOKEN>"; // provided by the backoffice
const fnoMapId = "<MAP-ID>" // id of the map to load
let FnoMapManager;
// wait page is loaded
window.addEventListener("load", function(){
// sdk is definied in the global variable "FnoMapManager" in window object
FnoMapManager = window.FnoMapManager;
FnoMapManager.initCanvasMode(fnoToken);
FnoMapManager.loadMap(idMap, 'MapContainer', function(){
console.log("2d map loaded");
})
});