After accessing the GL object, use the map class as follows to create a new map object:

map(mapElement, errCallback, addLayersControl)

Parameters:

mapElement is the ID of an HTML element that the map will be rendered in.

errCallback is a function for error management.

addLayersControl (Boolean)?: If false, layers control is off. default value is true.

Returns:

map: Returns map object to allow for method chaining.

Example:

const server = new Geobox.Server({origin:'https://api.geobox.ir'}); 
server.accessToken = "<your access token here>"; 
const map = new GL.Map('map', null, true);

Leave a comment

Your email address will not be published. Required fields are marked *