Manage temporary waypoint

Temporary waypoint are pins inserted in the current map session but are not saved in server. If you restart the map, all previous temporary waypoints will be removed.

insertTemporaryWaypoint

Create and show a new waypoint on the map

Parameters

Name

type

description

position

Position GPS

Position of the waypoint

label

string

Label to show

url_icon

string

Url of the image to show. Don't activate this option if you use the key "base64".

base64

string

Base64 of the image. Don't activate this option if you use the key "url_icon".

floor

int

floor where waypoint will be inserted

Result

Example

FnoMapManager.sendEvent('insertTemporaryWaypoint', { position: {latitude:"48.2", longitude: "2.8" }, label: "my POI", url_icon: "https://example.fr/my-image.png", floor: 5 }, (data) => { console.log("waypoint created:", data); });
let positionGPS = PositionGPS(latitude: 50.850837826709544, longitude: 4.351650924799158) map?.insertTemporaryWaypoint(label: "Label", urlIcon: "https://findnorder.com/images/pin.png", base64: nil, floor: 5, position: positionGPS) -- var parameters = [String:Any]() parameters["label"] = "my POI" parameters["url_icon"] = "https://example.fr/my-image.png" parameters["floor"] = 5 var position = [String:Any]() position["latitude"] = "48.2" position["longitude"] = "2.8" parameters["position"] = position map.sendEvent(eventName: "insertTemporaryWaypoint", data: parameters) // FNOMapDelegate method @objc optional func temporaryWaypointInserted(temporaryWaypoint: Any?) @objc optional func fnoMap(map: FNOMap, waypoint: Waypoint)
PositionGPS positionGPS = new PositionGPS(); positionGPS.setLatitude(50.850837826709544); positionGPS.setLongitude(4.351650924799158); locationMap.insertTemporaryWaypoint("Label", "https://findnorder.com/images/pin.png", null, 0, positionGPS, new MapFNO.CallbackWaypoint() { @Override public void onValue(Waypoint waypoint) { } }); -- JSONObject data = new JSONObject(); data.put("label", "my POI"); data.put("url_icon", "https://example.fr/my-image.png"); data.put("floor", 5); JSONObject position = new JSONObject(); position.put("latitude", "50.850837826709544"); position.put("longitude", "4.351650924799158"); data.put("position", position); map.sendEvent("insertTemporaryWaypoint", data, new MapFNO.CallbackJSON() { @Override public void onValue(JSONObject jsonObject) { Log.d("LOG", "insertTemporaryWaypoint result : " + jsonObject.toString()); } });

removeTemporaryWaypoint

Delete a temporary waypoint

Parameters

Name

type

description

id

int

Id of the temporary waypoint to delete

Result

No result

Example

FnoMapManager.sendEvent('removeTemporaryWaypoint', {id: 12345});
map.removeTemporaryWaypoint(id: 12345) -- var parameters = [String:Any](); parameters["id"] = 12345 map.sendEvent(eventName: "removeTemporaryWaypoint", data: parameters)
map.removeTemporaryWaypoint(12345); -- JSONObject data = new JSONObject(); data.put("id", 12345); map.sendEvent("removeTemporaryWaypoint", data, null);

moveTemporaryWaypoint

Move a waypoint position

Parameters

Name

type

description

id

int

id of the temporary waypoint to move

position

Position GPS

New coordinates of the waypoint

floor

int

Id floor of the GPS position

Result

No result

Example

FnoMapManager.sendEvent('moveTemporaryWaypoint', {id: 123,floor:2, position: {latitude: 0.0, longitude: 0.0}});
let positionGPS = PositionGPS(latitude: 50.85068678814428, longitude: 4.35151301430044) map.moveTemporaryWaypoint(id: 1, position: positionGPS, floor: 0) -- var parameters = [String:Any]() parameters["id"] = 123 parameters["floor"] = 2 var position = [String:Any]() position["latitude"] = "48.2" position["longitude"] = "2.8" parameters["position"] = position map.sendEvent(eventName: "moveTemporaryWaypoint", data: parameters)
PositionGPS positionGPS = new PositionGPS(); positionGPS.setLatitude(50.85068678814428); positionGPS.setLongitude(4.35151301430044); locationMap.moveTemporaryWaypoint(1, positionGPS, 2); -- JSONObject data = new JSONObject(); data.put("id", 123); data.put("floor", 2); JSONObject position = new JSONObject(); position.put("latitude", "48.2"); position.put("longitude", "2.8"); data.put("position", position); map.sendEvent("moveTemporaryWaypoint", data, null);

getAllTemporaryWaypoints

Get all temporary waypoints

Parameters

No parameter

Result

Name

type

description

waypoints

Temporary waypoint[]

All waypoints

Example

FnoMapManager.sendEvent('getAllTemporaryWaypoints', null, (data) => { console.log("Temporary waypoints:", data.waypoints) });
map.getAllTemporaryWaypoints() -- map.sendEvent(eventName: "getAllTemporaryWaypoints", data: nil) // delegate @objc optional func getAllTemporaryWaypoints(waypoints: Any?) @objc optional func fnoMap(map: FNOMap, waypoints: [Waypoint])
map.getAllTemporaryWaypoints(new MapFNO.CallbackWaypoints() { @Override public void onValue(List<Waypoint> waypoints) { } }); -- map.sendEvent("getAllTemporaryWaypoints", null, new MapFNO.CallbackJSON() { @Override public void onValue(JSONObject jsonObject) { Log.d("LOG", "getAllTemporaryWaypoints result : " + jsonObject.toString()); } });

toggleTemporaryWaypoints

Show or hide all temporay waypoints

Parameters

Name

type

description

state

boolean

true or false

Result

No result

Example

FnoMapManager.sendEvent('toggleTemporaryWaypoints', {state: true});
map.toggleTemporaryWaypoints(state: true) -- var parameters = [String:Any](); parameters["state"] = true map.sendEvent(eventName: "toggleTemporaryWaypoints", data: parameters)
map.toggleTemporaryWaypoints(true); -- JSONObject data = new JSONObject(); data.put("state", true); map.sendEvent("toggleTemporaryWaypoints", data, null);