API DOCUMENTATION

Introduction

This section explains how to use fatosmap api for javascript.

 

Usage Procedure

The implementation uses javaScript code to display the map on the html page, which consists of the following steps

1.Load the Maps API code libraries.
2.Initialize a map object, displaying the map.

 

Load the API Code Libraries

To load the fatosmap module, add the following element to your html document:

 

example
<script type="text/javascript" src="https://maps.fatos.biz/dist/fatosmap-gl.js"></script>

 

 

Initialize the map

This process displays the fatosmap at a fixed zoom level around a predefined position.
Refer to [Issuing API Key] for using fatosmap.

 

example
let LatLng = {lat: 1.28516, lng: 103.84738}
let map = new fatosmap.maps.Map(
document.getElementById("app"),
{
zoom: 14,
center: LatLng,
maxZoom: 20,
minZoom: 2,
scrollwheel: true,
scaleControl: true,
fullscreenControl: true,
zoomControl: false,
draggable: true,
rotateControl: true,
key: 'YOUR_API_KEY'
}
)

 

Parameter : Map Object
Required Parameter Description
Center Center is coordinate value that will be displayed to the center at the first loading of the map and is a required input.
Key Authentication value for map use. Required input value.

Optional Parameter Description
zoom The zoom value is the zoom in/out value of the map. Not the required input.
maxZoom Maximum zoom value. Not required value.
minZoom Minimum zoom value. Not required value.
zoomControl The value of the button to adjust the zoom level value of the map. Not required value.
dtaggable Whether the marker on the map can be moved to the desired location. Not required value.
rotateControl This option lets you interact with the rotation of the map by dragging it. Not required value.

 

Complete HTML Example Page

Below is the complete html source code that implements the basic fatosmap.

FATOS Map