-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b4dd759
commit d190311
Showing
8 changed files
with
206 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
layout: page | ||
title: JavaScript API | ||
permalink: /apis/javascript | ||
has_children: true | ||
nav_order: 4 | ||
parent: APIs | ||
--- |
4 changes: 2 additions & 2 deletions
4
docs/pages/APIs/JavaScript/JavaScript_API.md → ...s/APIs/JavaScript/JavaScript_API_save.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,185 @@ | ||
--- | ||
layout: page | ||
title: Utils | ||
permalink: /apis/javascript/utils | ||
parent: JavaScript API | ||
grand_parent: APIs | ||
--- | ||
|
||
# JavaScript API Utils | ||
|
||
The `src/essence/mmgisAPI/mmgisAPI.js` file exposes functions that can be called using the global `window.mmgisAPI` object. | ||
|
||
#### _Contents_ | ||
|
||
- [Layer Control](#layer-control) | ||
- [clearVectorLayer(layerUUID)](#clearvectorlayerlayeruuid) | ||
- [updateVectorLayer(layerUUID, inputData)](#updatevectorlayerlayeruuid-inputdata) | ||
- [trimVectorLayerKeepBeforeTime(layerUUID, keepBeforeTime, timePropPath)](#trimvectorlayerkeepbeforetimelayeruuid-keepbeforetime-timeproppath) | ||
- [trimVectorLayerKeepAfterTime(layerUUID, keepBeforeTime, timePropPath)](#trimvectorlayerkeepaftertimelayeruuid-keepbeforetime-timeproppath) | ||
- [keepFirstN(layerUUID, keepLastN)](#keepfirstnlayeruuid-keeplastn) | ||
- [keepLastN(layerUUID, keepLastN)](#keeplastnlayeruuid-keeplastn) | ||
- [trimLineString(layerUUID, time, timeProp, trimN, startOrEnd)](#trimlinestringlayeruuid-time-timeprop-trimn-startorend) | ||
- [appendLineString(layerUUID, inputData, timeProp)](#appendlinestringlayeruuid-inputdata-timeprop) | ||
- [reloadLayer(layer, evenIfOff, evenIfControlled)](#reloadlayerlayer-evenifoff-evenifcontrolled) | ||
- [asLayerUUID(uuid)](#asLayerUUIDuuid) | ||
- [Time Control](#time-control) | ||
- [toggleTimeUI(visibility)](#toggletimeuivisibility) | ||
- [setTime(startTime, endTime, isRelative, timeOffset, currentTime)](#settimestarttime-endtime-isrelative-timeoffset-currenttime) | ||
- [setLayerTime(layer, startTime, endTime)](#setlayertimelayer-starttime-endtime) | ||
- [getTime()](#gettime) | ||
- [getStartTime()](#getstarttime) | ||
- [getEndTime()](#getendtime) | ||
- [getLayerStartTime(layer)](#getlayerstarttimelayer) | ||
- [getLayerEndTime(layer)](#getlayerendtimelayer) | ||
- [reloadTimeLayers()](#reloadtimelayers) | ||
- [setLayersTimeStatus(color)](#setlayerstimestatuscolor) | ||
- [setLayerTimeStatus(layer, color)](#setlayertimestatuslayer-color) | ||
- [updateLayersTime()](#updatelayerstime) | ||
- [Event Listeners](#event-listeners) | ||
- [addEventListener(eventName, functionReference)](#addeventlistenereventname-functionreference) | ||
- [removeEventListener(eventName, functionReference)](#removeeventlistenereventname-functionreference) | ||
- [Map Feature Information](#map-feature-information) | ||
- [map](#map) | ||
- [featuresContained()](#featurescontained) | ||
- [getActiveFeature()](#getactivefeature) | ||
- [selectFeature(layerUUID, options)](#selectfeaturelayeruuid-options) | ||
- [getVisibleLayers()](#getvisiblelayers) | ||
- [getLayers()](#getlayers) | ||
- [getLayerConfigs(match)](#getlayerconfigsmatch) | ||
- [toggleLayer(layerUUID, on)](#toggleLayerlayeruuid-on) | ||
- [Miscellaneous Features](#miscellaneous-features) | ||
- [writeCoordinateURL()](#writecoordinateurl) | ||
- [onLoaded(onLoadCallback)](#onloadedonloadcallback) | ||
- [getActiveTool()](#getactivetool) | ||
- [project(lnglat)](#projectlnglat) | ||
- [unproject(xy)](#unprojectxy) | ||
|
||
--- | ||
|
||
GeoJSONStringify(geojson) | ||
RGBAto32RGBAto32(rgba) | ||
areaOfTriangle(aX, aY, bX, bY, cX, cY) | ||
arrayAverage(array, key) | ||
arrayUnique(array) | ||
asByteString(byte) | ||
bearingBetweenTwoLatLngs(lat1, lng1, lat2, lng2) | ||
bearingFromGreatArcDistance(distance) | ||
boundingBoxToFeature(nE, sW) | ||
bracketReplace(str, obj, replace) | ||
calcHeightLine(i, Za, Zo) | ||
calcPolygonArea(vertices) | ||
chunkArray(arr, size) | ||
circleFeatureFromTwoLngLats(lnglatCenter, lnglatRadius, steps, crs) | ||
cleanString(str) | ||
clone(obj) | ||
cloneCanvas(oldCanvas) | ||
closestPoint(p, pts) | ||
closestToSegment(p, v, w) | ||
closestToSegments(p, lines) | ||
colorCodeToColor(code) | ||
coordinateDepthTraversal(array, onEachLeaf, \_path) | ||
copyToClipboard(text) | ||
csvToJSON(csv) | ||
decodeFloat(binary) | ||
degreesToMeters(degrees) | ||
destinationFromBearing(lat, lng, bearing, distance, round_off = undefined) | ||
diff(arr1, arr2) | ||
distanceFormula(x1, y1, x2, y2) | ||
doBoundingBoxesIntersect(a, b) | ||
doubleToTwoFloats(double) | ||
download(filepath) | ||
downloadArrayAsCSV(headers, array, exportName) | ||
downloadCanvas(canvasId, name, callback) | ||
downloadObject(exportObj, exportName, exportExt) | ||
dynamicSort(property) | ||
enumerate(obj) | ||
f32round(x) | ||
fileNameFromPath(path) | ||
geoJSONFeatureMetersToDegrees(feature) | ||
geojsonAddSpatialProperties(geojson) | ||
getBase64Transparent256Tile() | ||
getBaseGeoJSON(featuresArray) | ||
getBrowser() | ||
getColorFromRangeByPercent(colors, percent, asRGBString) | ||
getColorScale(i, s, l) | ||
getCookieValue(a) | ||
getEarthToPlanetRatio() | ||
getExtension(string) | ||
getFeatureArea(feature, displayFriendly) | ||
getFeatureLatLngs(feature) | ||
getFeatureLength(feature, displayFriendly) | ||
getImageData(image) | ||
getIn(obj, keyArray, notSetValue) | ||
getKeyByValue(obj, value) | ||
getLatLngs(layer) | ||
getMinMaxOfArray(arrayOfNumbers) | ||
getPixel(imagedata, x, y) | ||
getPtSomeDistBetween2OtherPts(x0, y0, x1, y1, d) | ||
getSafeName(name) | ||
getTextShadowString(color, opacity, weight) | ||
getTimeStartsBetweenTimestamps (startTime, endTime, unit) | ||
getValueByKeyCaseInsensitive(key, obj) | ||
hexToRGB(hex) | ||
hexToRGBA(hex, a) | ||
identicalElements(arr) | ||
inclinationBetweenTwoLatLngs(lat1, lng1, elev1, lat2, lng2, elev2) | ||
intToRGB(i) | ||
interpolatePointsPerun(p1, p2, p) | ||
invertGeoJSONLatLngs(feature) | ||
isColor(strColor) | ||
isEmpty(obj) | ||
isEqual(obj1, obj2, isSimple) | ||
isInZoomRange(minZoom, maxZoom, zoom) | ||
isNoDataElev(data) | ||
isStringNumeric(str) | ||
isUrlAbsolute(url) | ||
isValidUrl(str) | ||
lat2tileUnfloored(lat, zoom) | ||
latlonzoomToTileCoords(lat, lon, zoom) | ||
lineOfSight1D(heightArray, observerHeight, targetHeight) | ||
linearScale(domain, range, value) | ||
lngLatDistBetween(lon1, lat1, lon2, lat2) | ||
lnglatsToDemtileElevs(lnglats, demtilesets, callback) | ||
lon2tileUnfloored(lon, zoom) | ||
lonLatToVector3nr(lon, lat, height) | ||
makeColorGrid(x, y) | ||
marsEarthSurfaceAreaRatio() | ||
metersToDegrees(meters) | ||
mod(n, m) | ||
monthNumberToName(monthNumber) | ||
noNullLength(arr) | ||
numberToWords(n) | ||
objectArrayIndexOfKeyWithValue(objectArray, key, value) | ||
pad(num, size) | ||
parseColor(color) | ||
pointsInPoint(point, layers) | ||
populateUrl(url, xyz, invertY) | ||
prettifyName(name) | ||
range (a, b) | ||
removeDuplicatesInArray(arr) | ||
removeDuplicatesInArrayOfObjects(arr) | ||
rgb2hex(rgb) | ||
rgbObjToStr(rgb, hasAlpha) | ||
rgbToArray(rgb) | ||
rotatePoint(pt, center, angle) | ||
rotatePoint3D(pt, angle, center) | ||
round(number, decimals = 0) | ||
sanitize(str) | ||
scaleImageInHalf(image, width, height) | ||
setRadius(which, radius) | ||
sortGeoJSONFeatures(geojson) | ||
stitchArrays(keyArray, valueArray) | ||
stringToColor(str) | ||
stringToColor2(stringInput) | ||
subdivideLine(line, meters) | ||
tileContains(xyz, z, useLast) | ||
tileIsContained(xyzContainer, xyzContained, useLast) | ||
tilesWithin(xyz, z) | ||
timestampToDate(timestamp) | ||
toEllipse(lnglat, axes, crs, options) | ||
toEllipsisString(str, length) | ||
toHost() | ||
toHostForceLanding() | ||
uniqueArray(arr) | ||
validTextColour(stringToTest) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters