To open a map that has already been created in geobox studio, first copy the uuid of the map from the geobox portal and get the map from the server:

getMap(map_uuid)

Example:

const mapObject = await Server.getMap('4f9f3e4b-4dc1-469b-83ab-00ae00f02581');

Then open the map as follows.

addMap(mapObject, apikey)

Parameters:

mapObject is the map that is got from the server.

apikey is described in manage accounts and access tokens.

Returns:

String: Returns a message that shows adding map was successful or not. Null message means adding was successful.

Example:

const result = await map.addMap(mapObject ,"<apikey here>");

See the Pen Contact Form – Pen a Day 20 by geobox (@geobox-gl-demo) on CodePen.1

Leave a comment

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