Skip to content

Commit

Permalink
Histogram function
Browse files Browse the repository at this point in the history
  • Loading branch information
maartenplieger committed Jun 8, 2023
1 parent 710b855 commit ff35044
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 49 deletions.
6 changes: 6 additions & 0 deletions config.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ var getFeatureInfoApplications = [
iconCls: "button_getfeatureinfo",
location: "apps/gfiapp_d3c3.html",
},
{
name: "Histogram mode",
iconCls: "button_getfeatureinfo",
location: "apps/gfiapp_histogram.html",
},

{
name: "EProfile",
iconCls: "button_getfeatureinfo",
Expand Down
1 change: 1 addition & 0 deletions index.dev.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
<script src="./apps/autowms_app.js"></script>
<script src="./apps/gfiapp_point_interest.js"></script>
<script src="./apps/gfiapp_eprofile.js"></script>
<script src="./apps/gfiapp_histogram.js"></script>
<link rel="stylesheet" href="./apps/autowms_app.css" />
<link rel="stylesheet" href="./apps/gfiapp_d3c3.css" />

Expand Down
85 changes: 37 additions & 48 deletions webmapjs/WMJSMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -296,14 +296,12 @@ export default class WMJSMap {
this.setBaseURL = this.setBaseURL.bind(this);
this.showDialogs = this.showDialogs.bind(this);
this.setXML2JSONURL = this.setXML2JSONURL.bind(this);
this.setWMJSTileRendererTileSettings = this.setWMJSTileRendererTileSettings.bind(
this
);
this.setWMJSTileRendererTileSettings =
this.setWMJSTileRendererTileSettings.bind(this);
this.getLegendStore = this.getLegendStore.bind(this);
this.makeComponentId = this.makeComponentId.bind(this);
this.enableInlineGetFeatureInfo = this.enableInlineGetFeatureInfo.bind(
this
);
this.enableInlineGetFeatureInfo =
this.enableInlineGetFeatureInfo.bind(this);
this.dialogClosed = this.dialogClosed.bind(this);
this.closeAllGFIDialogs = this.closeAllGFIDialogs.bind(this);
this.onLegendCallbackFunction = this.onLegendCallbackFunction.bind(this);
Expand Down Expand Up @@ -347,9 +345,8 @@ export default class WMJSMap {
this.abort = this.abort.bind(this);
this.isBusy = this.isBusy.bind(this);
this._makeInfoHTML = this._makeInfoHTML.bind(this);
this.getLegendGraphicURLForLayer = this.getLegendGraphicURLForLayer.bind(
this
);
this.getLegendGraphicURLForLayer =
this.getLegendGraphicURLForLayer.bind(this);
this.showScaleBar = this.showScaleBar.bind(this);
this.hideScaleBar = this.hideScaleBar.bind(this);
this.getMaxNumberOfAnimations = this.getMaxNumberOfAnimations.bind(this);
Expand All @@ -360,15 +357,12 @@ export default class WMJSMap {
this._draw = this._draw.bind(this);
this._drawAndLoad = this._drawAndLoad.bind(this);
this._drawReady = this._drawReady.bind(this);
this._onLayersReadyCallbackFunction = this._onLayersReadyCallbackFunction.bind(
this
);
this._onMapReadyCallbackFunction = this._onMapReadyCallbackFunction.bind(
this
);
this._onResumeSuspendCallbackFunction = this._onResumeSuspendCallbackFunction.bind(
this
);
this._onLayersReadyCallbackFunction =
this._onLayersReadyCallbackFunction.bind(this);
this._onMapReadyCallbackFunction =
this._onMapReadyCallbackFunction.bind(this);
this._onResumeSuspendCallbackFunction =
this._onResumeSuspendCallbackFunction.bind(this);
this._animFrameRedraw = this._animFrameRedraw.bind(this);
this.getWMSRequests = this.getWMSRequests.bind(this);
this.prefetch = this.prefetch.bind(this);
Expand All @@ -377,12 +371,10 @@ export default class WMJSMap {
this._pdraw = this._pdraw.bind(this);
this._updateBoundingBox = this._updateBoundingBox.bind(this);
this.flipBuffers = this.flipBuffers.bind(this);
this.getBackBufferCanvasContext = this.getBackBufferCanvasContext.bind(
this
);
this.getFrontBufferCanvasContext = this.getFrontBufferCanvasContext.bind(
this
);
this.getBackBufferCanvasContext =
this.getBackBufferCanvasContext.bind(this);
this.getFrontBufferCanvasContext =
this.getFrontBufferCanvasContext.bind(this);
this.redrawBuffer = this.redrawBuffer.bind(this);
this.addBaseLayers = this.addBaseLayers.bind(this);
this.setBaseLayers = this.setBaseLayers.bind(this);
Expand All @@ -405,17 +397,15 @@ export default class WMJSMap {
this.getMapMode = this.getMapMode.bind(this);
this.getWMSMetaDataRequestURL = this.getWMSMetaDataRequestURL.bind(this);
this.getPointInfoRequestURL = this.getPointInfoRequestURL.bind(this);
this.getWMSGetFeatureInfoRequestURL = this.getWMSGetFeatureInfoRequestURL.bind(
this
);
this.getWMSGetFeatureInfoRequestURL =
this.getWMSGetFeatureInfoRequestURL.bind(this);
this.featureInfoRequestReady = this.featureInfoRequestReady.bind(this);
this.newGetPointInfo = this.newGetPointInfo.bind(this);
this.getPointInfo = this.getPointInfo.bind(this);
this.newGetFeatureInfo = this.newGetFeatureInfo.bind(this);
this.getFeatureInfo = this.getFeatureInfo.bind(this);
this.getGetFeatureInfoObjectAsHTML = this.getGetFeatureInfoObjectAsHTML.bind(
this
);
this.getGetFeatureInfoObjectAsHTML =
this.getGetFeatureInfoObjectAsHTML.bind(this);
this.getMapPinXY = this.getMapPinXY.bind(this);
this.positionMapPinByLatLon = this.positionMapPinByLatLon.bind(this);
this.repositionMapPin = this.repositionMapPin.bind(this);
Expand All @@ -429,17 +419,14 @@ export default class WMJSMap {
this.setMapModePan = this.setMapModePan.bind(this);
this.setMapModePoint = this.setMapModePoint.bind(this);
this.setMapModeNone = this.setMapModeNone.bind(this);
this.getMouseCoordinatesForDocument = this.getMouseCoordinatesForDocument.bind(
this
);
this.getMouseCoordinatesForElement = this.getMouseCoordinatesForElement.bind(
this
);
this.getMouseCoordinatesForDocument =
this.getMouseCoordinatesForDocument.bind(this);
this.getMouseCoordinatesForElement =
this.getMouseCoordinatesForElement.bind(this);
this.mouseDown = this.mouseDown.bind(this);
this._checkInvalidMouseAction = this._checkInvalidMouseAction.bind(this);
this.updateMouseCursorCoordinates = this.updateMouseCursorCoordinates.bind(
this
);
this.updateMouseCursorCoordinates =
this.updateMouseCursorCoordinates.bind(this);
this.mouseDownEvent = this.mouseDownEvent.bind(this);
this.mouseMoveEvent = this.mouseMoveEvent.bind(this);
this.mouseUpEvent = this.mouseUpEvent.bind(this);
Expand All @@ -463,9 +450,8 @@ export default class WMJSMap {
this.getPixelCoordFromLatLong = this.getPixelCoordFromLatLong.bind(this);
this.WCJSSearchRequest = this.WCJSSearchRequest.bind(this);
this.WCJSSearchRequestGeoNames = this.WCJSSearchRequestGeoNames.bind(this);
this.calculateBoundingBoxAndZoom = this.calculateBoundingBoxAndZoom.bind(
this
);
this.calculateBoundingBoxAndZoom =
this.calculateBoundingBoxAndZoom.bind(this);
this.getLatLongFromPixelCoord = this.getLatLongFromPixelCoord.bind(this);
this.getPixelCoordFromGeoCoord = this.getPixelCoordFromGeoCoord.bind(this);
this.addListener = this.addListener.bind(this);
Expand Down Expand Up @@ -2303,9 +2289,8 @@ export default class WMJSMap {
{ layer: this.layers[j] },
this.layers[j].opacity
);
this.layers[j].image = this.divBuffer[this.newSwapBuffer].layers[
currentLayerIndex
];
this.layers[j].image =
this.divBuffer[this.newSwapBuffer].layers[currentLayerIndex];
currentLayerIndex++;
}
}
Expand Down Expand Up @@ -3584,6 +3569,11 @@ export default class WMJSMap {
mouseDragEnd(x, y) {
if (this.mouseDragging === 0) return;
this.mouseDragging = 0;
this.callBack.triggerEvent("beforemapdragend", {
map: this,
x: this.mouseUpX,
y: this.mouseUpY,
});
if (this.mapMode === "pan") this._mapPanEnd(x, y);
if (this.mapMode === "zoom") this._mapZoomEnd(x, y);
this.callBack.triggerEvent("mapdragend", {
Expand Down Expand Up @@ -4236,9 +4226,8 @@ export default class WMJSMap {
for (let j = 0; j <= this.UndoPointer; j++)
this.WMJSProjection_tempundo[j] = this.WMJSProjection_undo[j];
for (let j = 0; j <= this.UndoPointer; j++)
this.WMJSProjection_undo[j] = this.WMJSProjection_tempundo[
this.UndoPointer - j
];
this.WMJSProjection_undo[j] =
this.WMJSProjection_tempundo[this.UndoPointer - j];
this.UndoPointer = 0;
}
for (let j = this.MaxUndos - 1; j > 0; j--) {
Expand Down
2 changes: 1 addition & 1 deletion webmapjsext/WMJSExtMain.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ var error = function (e) {
var debug = function (e) {
console.log(e);
};
var versionInfo = "ADAGUC viewer version 4.1.0.";
var versionInfo = "ADAGUC viewer version 4.2.0.";
var mainWebmapJS;

function decimalFormatter(input, width) {
Expand Down

0 comments on commit ff35044

Please sign in to comment.