Code Monkey home page Code Monkey logo

mapapps-layer-swipe's Introduction

Layer Swipe Bundle

The Layer Swipe bundle allows you to easily compare the content of two different layers in a map using the LayerSwipe widget of the Esri ArcGIS API for JavaScript. In the configuration you can choose between horizontal, vertical and scope viewing modes.

Screenshot Layer Swipe Sample

Sample App

https://demos.conterra.de/mapapps/resources/apps/downloads_layer_swipe4/index.html

Installation Guide

Requirement: map.apps 4.8.0

dn_layerswipe Documentation

Development Guide

Define the mapapps remote base

Before you can run the project you have to define the mapapps.remote.base property in the pom.xml-file: <mapapps.remote.base>http://%YOURSERVER%/ct-mapapps-webapp-%VERSION%</mapapps.remote.base>

Other methods to to define the mapapps.remote.base property.

  1. Goal parameters mvn install -Dmapapps.remote.base=http://%YOURSERVER%/ct-mapapps-webapp-%VERSION%

  2. Build properties Change the mapapps.remote.base in the build.properties file and run: mvn install -Denv=dev -Dlocal.configfile=%ABSOLUTEPATHTOPROJECTROOT%/build.properties

mapapps-layer-swipe's People

Contributors

dpayk avatar matthiasstein avatar sarahlechler avatar schneiderlars avatar sholtkamp avatar slim01 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

mapapps-layer-swipe's Issues

Bundle cannot be stopped properly

When stopping the bundle an error is thrown. The hideWidget function tries to access property _swipeWidget and calls destroy(). This is not working. Same would apply for the removal of the _viewModeWatcher.

Reproduction:

  1. Open sample app https://demos.conterra.de/mapapps/resources/apps/downloads_layer_swipe4/index.html
  2. Open browser console
  3. Open map.apps console with CTRL + F12
  4. Stop bundle dn_layerswipe

Expected result:

  • Bundle is stopped properly - no errors are thrown

Actual result:

  • Error "Cannot read property 'destroy' of null" is printed in the browser cosole

This error occurs i.e. in scenarios where the map widget is restarted.

layerswipe reagiert nicht auf MapWidgetModel.view.padding

Das mapWidgetModel ermöglicht die Verschiebung der Karte, z. B. wenn das TOC aktiviert wird. Dadurch behält die Karte den sichtbaren Mittelpunkt bei.
Sobald die das Padding aktiviert ist, entsteht zwischen der layerSwipe-Grenze und der Grenze der noch sichtbaren Thematischen Karten eine Lücke. Ohne Padding sind beide identisch.
Wäre es möglich, das layerswipe-bundle so anzupassen, dass es auf die MapWidgetModel.view.padding-Eigenschaft reagiert?
grafik

Ratio should be configurable

The ratio between the two layers should be configurable.

For example:
"SwipeController": { "swipeLayerWidgetOpts": { "type": "vertical", "left" : "50%" } }

Possible timing issue

In map.apps 4.11 the swipeable image data sometimes loads while at other times it does not.

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.