Comments (3)
@Beak-man I have an update from a conversation with @AkeluX this morning. @AkeluX made a good case for keeping this PR as-is. By exposing the crossOrigin retrieval option as a property, rather than through the constructor as we are considering, eliminates the need to modify every TiledImageLayer subclass constructor.
This made a lot of sense to me. What to you think?
from webworldwind.
@pdavidc, I concur with @AkeluX considering that we want to release 0.9.0 soon. TiledImageLayer has seven subclasses and each one would need to be refactored.
I do like your idea of using a configuration object for the constructor. We wouldn't be redesigning from scratch, since two of TiledImageLayer's subclasses — WmsLayer and RestTiledImageLayer — make use of configuration objects to feed the TiledImageLayer constructor (each one in a different manner, and RestTiledImageLayer's is entirely optional, it's not being currently used). Refactoring the seven subclasses with such a pattern may be considered a big task considering we just want to address a single property.
Furthermore, I just discussed this with @markpet49 and he pointed out that just using a 'plain', user-made object as configuration (as is the case with the two aforementioned subclasses) instead of one controlled through a constructor of its own (i.e. a class), is kind of flaky and prone to errors. To have good control over the configuration parameters, we would need to design a 'LayerConfiguration' class or such. I didn't consider this before talking with Mark, and I concur with him. Again this widens the scope of this task and increases the amount of code to maintain if we implement it.
I think the authors of WmsLayer and RestTiledImageLayer used configuration objects as a way to work around the amount of parameters for TiledImageLayer's constructor, but if we do a refactor to consider a configuration class or even just a plain, arbitrary object, it should be considered as a separate, broader task that has more to do with homogenizing the usage of TiledImageLayer by its subclasses, than considering a single property.
from webworldwind.
@Beak-man That's a good summary of the key points to consider.
Let's merge #268 as-is, and revisit this when the need arises.
from webworldwind.
Related Issues (20)
- WMTS Tile Flicker
- Misleading naming in GeoTiffReader.js HOT 1
- Poor error messages in proj4-src.js HOT 2
- kmlSubstyle balloonStyle display support for kmlFile layer placemarks HOT 9
- KML LabelStyle tag with scale 0 does not impact label.
- Placemarks not showing below surface
- Load potree point cloud in world wind web.
- Hosted library files missing for 0.10.0 release HOT 1
- Documentation examples reference outdated 0.9.0 worldwind.min.js version HOT 1
- Standalone example out of date HOT 1
- Error downloading map data SEVERE: Error attempting to retrieve https://worldwind22.arc.nasa.gov/geoserver HOT 1
- SurfaceShape picking is unpredictable HOT 2
- Free camera navigation is missing
- Investigate changing our headless browser toolchain for Selenium
- npm module does not work with webpack HOT 4
- Complete 0.11.0 release process
- Not all shape files supported?
- Get Started Documentation References Wrong WMS Address HOT 1
- Are there any plans for integration of GLTFLoader?
- GoToLocation.html location input doesn't do anything
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webworldwind.