Code Monkey home page Code Monkey logo

gis-app's Introduction

dhis2-gis

DHIS 2 GIS Web App

gis-app's People

Contributors

adeelshahid avatar dhis2-bot avatar janhenrikoverland avatar jason-p-pickering avatar philip-larsen-donnelly avatar turban avatar varl avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gis-app's Issues

Order features after type and value

For best map display: Draw polygons first and the points in ascending order.

Thematic layer (type and value) + Boundary layer (type only)

Replace Ext.js functionality with d2-utilizr and native code

  • Ext.isArray -> import isArray from 'd2-utilizr/lib/isArray';
  • Ext.isBoolean -> import isBoolean from 'd2-utilizr/lib/isBoolean';
  • Ext.isEmpty -> import isEmpty from 'd2-utilizr/lib/isEmpty';
  • Ext.isFunction -> import isFunction from 'd2-utilizr/lib/isFunction';
  • Ext.isNumber -> import isNumber from 'd2-utilizr/lib/isNumber';
  • Ext.isNumeric -> import isNumeric from 'd2-utilizr/lib/isNumeric';
  • Ext.isObject -> import isObject from 'd2-utilizr/lib/isObject';
  • Ext.isString -> import isString from 'd2-utilizr/lib/isString';
  • Ext.Array.clean -> import arrayClean from 'd2-utilizr/lib/arrayClean';
  • Ext.Array.contains -> import arrayContains from 'd2-utilizr/lib/arrayContains';
  • Ext.Array.difference -> import arrayDifference from 'd2-utilizr/lib/arrayDifference';
  • Ext.Array.from -> import arrayFrom from 'd2-utilizr/lib/arrayFrom';
  • Ext.Array.pluck -> import arrayPluck from 'd2-utilizr/lib/arrayPluck';
  • Ext.Array.sort -> import arraySort from 'd2-utilizr/lib/arraySort';
  • Ext.Array.unique -> import arrayUnique from 'd2-utilizr/lib/arrayUnique';

Use native:

  • Ext.Array.each -> forEach
  • Ext.decode -> JSON.parse
  • Ext.encode -> JSON.stringify

Show map legends in widgets.

Temporarily disabled in LayerHandlerThematic.js

if (layer.legendPanel) { // TODO: temporarily fix
  layer.legendPanel.update(element.outerHTML);
}

Show event data on click

Show attributes in popup checked in "Programs / Attributes" -> Program -> Select a program -> View program stages -> Select a stage -> Edit

screen shot 2016-03-19 at 18 01 17

Facility layer multiple group sets filter

Add support for selecting / filtering on all available organisation unit group sets in the GIS facility layer. Display all org unit group sets as drop-downs in the layer screen and allow the user to select one group from each drop-down, or to skip the drop down in order to exclude it from the filter.

  • one dropdown per group set
  • OR between groups
  • AND between group sets
  • remove OU by group mode

https://blueprints.launchpad.net/dhis2/+spec/gis-facility-layer-multiple-group-sets

Bug if dashboard map is empty

  • Show message when there is no data available for the favorite period (util.message.alert)
  • Bug when analytics tables are not generated (see screnshot below).

Bug with event layer when selecting "Facility" as organisation unit

HTTP ERROR 500
Problem accessing /api/analytics/events/query/eBAyeGv0exc.json.
Reason: Server Error
Caused by: org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.dao.DataAccessResourceFailureException:

Remove Ext JS dependency of dashboard maps

Replace in core functions:

  • Ext.apply
  • Ext.applyIf
  • Ext.clone
  • Ext.Ajax.request
  • Ext.Loader.injectScriptElement
  • Ext.util.CSS.createStyleSheet
  • Ext.get
  • Ext.LoadMask
  • Ext.window.Window
  • Ext.panel.Panel
  • Ext.menu.Menu
  • Ext.menu.Item
  • Ext.data.Store

Inconsistent behavior with translated orgunits

When the database language is set to something other than English (e.g. Burmese) the Orgunit tree is displayed with the correct translations of orgunits. However, when hovering over a geographical feature, the base language is displayed.

selection_524

However, when changing the interface language to for example (the language of the translation) the translation is displayed.
selection_525

This would seem to be inconsistent as the orgunit translations should be derived from the database language, not the interface language.

On version 2.22 21920

@janhenrikoverland @turban

Fix UglifyJS warnings

WARNING in core.js from UglifyJs
Dropping unused variable selectHandlers [./src/core/FeatureContextMenu.js:11,8]
Dropping unused variable win [./src/core/FeaturePopup.js:30,16]
Dropping unreachable code [./src/core/LayerHandlerBoundary.js:63,8]
Dropping unused variable levelOrder [./src/core/LayerHandlerBoundary.js:105,16]
Dropping unused variable loadLegend [./src/core/LayerHandlerBoundary.js:5,8]
Dropping unused variable layerConfig [./src/core/LayerHandlerEvent.js:79,20]
Dropping unused variable config [./src/core/LayerHandlerEvent.js:74,16]
Dropping unused variable features [./src/core/LayerHandlerEvent.js:17,12]
Dropping unused variable compareView [./src/core/LayerHandlerEvent.js:3,8]
Side effects in initialization of unused variable dimConf [./src/core/LayerHandlerEvent.js:9,8]
Dropping unused variable addCircles [./src/core/LayerHandlerFacility.js:10,2]
Dropping unused variable isValidCoordinate [./src/core/LayerHandlerFacility.js:14,2]
Dropping unused variable addNames [./src/core/LayerHandlerThematic.js:352,12]
Dropping unused variable addData [./src/core/LayerHandlerThematic.js:5,8]
Side effects in initialization of unused variable dimConf [./src/core/LayerHandlerThematic.js:19,8]
Dropping unused variable closeAllLayers [./src/core/MapLoader.js:4,2]
Dropping unused variable obj [./src/core/getInstance.js:789,32]
Dropping unused variable a [./src/core/getInstance.js:999,20]
Dropping unused variable layerConf [./src/core/getInstance.js:1002,20]
Dropping unused variable layers [./src/core/getInstance.js:7,8]
Condition always false [./~/base64-js/lib/b64.js:124,1]

WARNING in app.js from UglifyJs
Dropping unused variable tbar [./src/app/FavoriteWindow.js:16,8]
Dropping unused variable bbar [./src/app/FavoriteWindow.js:17,8]
Side effects in initialization of unused variable dimConf [./src/app/FavoriteWindow.js:29,8]
Dropping unused variable key [./src/app/LayerWidgetBoundary.js:113,43]
Side effects in initialization of unused variable rts [./src/app/LayerWidgetBoundary.js:252,20]
Dropping unused variable panel [./src/app/LayerWidgetBoundary.js:677,28]
Dropping unused variable stageId [./src/app/LayerWidgetEvent.js:232,24]
Dropping unused variable ux [./src/app/LayerWidgetEvent.js:543,33]
Dropping unused variable key [./src/app/LayerWidgetEvent.js:702,43]
Side effects in initialization of unused variable rts [./src/app/LayerWidgetEvent.js:841,20]
Dropping unused variable periodMode [./src/app/LayerWidgetEvent.js:26,8]
Dropping unused variable onPeriodModeSelect [./src/app/LayerWidgetEvent.js:27,8]
Dropping unused variable getDateLink [./src/app/LayerWidgetEvent.js:28,8]
Dropping unused variable startEndDate [./src/app/LayerWidgetEvent.js:31,8]
Dropping unused variable onPeriodChange [./src/app/LayerWidgetEvent.js:34,8]
Dropping unused variable onCheckboxAdd [./src/app/LayerWidgetEvent.js:35,8]
Dropping unused variable intervalListeners [./src/app/LayerWidgetEvent.js:36,8]
Dropping unused variable relativePeriodCmpMap [./src/app/LayerWidgetEvent.js:37,8]
Dropping unused variable weeks [./src/app/LayerWidgetEvent.js:38,8]
Dropping unused variable months [./src/app/LayerWidgetEvent.js:39,8]
Dropping unused variable biMonths [./src/app/LayerWidgetEvent.js:40,8]
Dropping unused variable quarters [./src/app/LayerWidgetEvent.js:41,8]
Dropping unused variable sixMonths [./src/app/LayerWidgetEvent.js:42,8]
Dropping unused variable financialYears [./src/app/LayerWidgetEvent.js:43,8]
Dropping unused variable years [./src/app/LayerWidgetEvent.js:44,8]
Dropping unused variable relativePeriod [./src/app/LayerWidgetEvent.js:45,8]
Dropping unused variable checkboxes [./src/app/LayerWidgetEvent.js:46,8]
Dropping unused variable fixedPeriodAvailable [./src/app/LayerWidgetEvent.js:48,8]
Dropping unused variable fixedPeriodSelected [./src/app/LayerWidgetEvent.js:49,8]
Dropping unused variable onPeriodTypeSelect [./src/app/LayerWidgetEvent.js:50,8]
Dropping unused variable periodType [./src/app/LayerWidgetEvent.js:51,8]
Dropping unused variable prevYear [./src/app/LayerWidgetEvent.js:52,8]
Dropping unused variable nextYear [./src/app/LayerWidgetEvent.js:53,8]
Dropping unused variable fixedPeriodSettings [./src/app/LayerWidgetEvent.js:54,8]
Dropping unused variable fixedPeriodAvailableSelected [./src/app/LayerWidgetEvent.js:55,8]
Dropping unused variable periods [./src/app/LayerWidgetEvent.js:56,8]
Side effects in initialization of unused variable namePropertyUrl [./src/app/LayerWidgetEvent.js:86,8]
Side effects in initialization of unused variable nameProperty [./src/app/LayerWidgetEvent.js:87,8]
Dropping unused variable key [./src/app/LayerWidgetFacility.js:154,43]
Side effects in initialization of unused variable rts [./src/app/LayerWidgetFacility.js:293,20]
Dropping unused variable panel [./src/app/LayerWidgetFacility.js:771,28]
Dropping unused variable key [./src/app/LayerWidgetThematic.js:1052,43]
Side effects in initialization of unused variable rts [./src/app/LayerWidgetThematic.js:1191,20]
Side effects in initialization of unused variable vType [./src/app/LayerWidgetThematic.js:1685,12]
Dropping unused variable panel [./src/app/LayerWidgetThematic.js:1965,28]
Dropping unused variable record [./src/app/LegendSetWindow.js:83,20]
Dropping unused variable showUpdateLegend [./src/app/LegendSetWindow.js:258,16]
Dropping unused variable validateForm [./src/app/LegendSetWindow.js:259,16]
Dropping unused variable reset [./src/app/LegendSetWindow.js:245,12]
Dropping unused variable data [./src/app/LegendSetWindow.js:246,12]
Dropping unused variable button [./src/app/SearchWindow.js:6,8]
Dropping unused variable padding [./src/app/createExtensions.js:224,16]
Side effects in initialization of unused variable conf [./src/app/extendInstance.js:3,8]

Bug when saving favorites

var id = r.getAllResponseHeaders().location.split('/').pop();

[10:07]
Får: Uncaught TypeError: Cannot read property 'split' of undefined

Probably related to cross domain requests:

Ext.Ajax.defaultHeaders = {
'Authorization': 'Basic ' + btoa(context.auth)
};

Download map support

It's currently possible to download a map as a PNG, but it only works for for vector overlays and not base maps. We should remove or improve this feature.

The best option will probably be to use a headless browser (e.g. PhantomJS) to programmatically capture map contents. This should work with all layer types supported by Leaflet.

An alternative is to do this in the browser, which requires all map layers to be drawn with Canvas. This will probably be more complicated to implement.

https://blueprints.launchpad.net/dhis2/+spec/gis-download-facility-layer

Fixed vs. flexible map layer ordering

The new Leaflet API is made with flexible layer ordering, while the previous OpenLayers version uses a fixed layer order. We need to make the two solutions play nicely together.

Bug when editing a favorite

If you open a favorite "ANC: 1st visit coverage (%) by district last year" and select "Edit layer", you get an error:

Uncaught TypeError: Cannot read property 'objectName' of undefined

LayerWidgetThematic.js:1738 Uncaught TypeError: Cannot read property 'objectName'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.