IceBear Map Handlers API - Glavin001/open-world GitHub Wiki

IceBear Engine - MapHandler.js API


List of functions

IB.map.getPlayerGeoLocation = function(callback, errorCallback)

IB.map.currentPlayerLonLat = function(callback)

Brief: Retrieves the player's Geolocation and then converts into LonLatPoint Args:

  • callback: function()

IB.map.geocoding = function(address, callback)

IB.map.reverseGeocoding = function(latLonPoint, callback)


FAQ / Common Usage

Get player's current Geolocation in LatLonPoint form

IB.map.currentPlayerLonLat( function(point) {
// *point* variable is now a LonLatPoint of the Geolocation
console.log(point);
});