Refactored proj modules #6204

merged 7 commits into from Dec 6, 2016


None yet

2 participants

tschaub commented Dec 4, 2016

This reworks the modules in ol/proj so we have one provide per module.

The one resulting API change is that we have ol.proj.getPointResolution() instead of projection.getPointResolution(). The getPointResolution function requires the use of an inverse transform (from projected coordinates to geographic coordinates). Our ol.proj.Projection instances are not constructed or otherwise provided with inverse or forward transforms, so it doesn't make sense to have this function be a method of a projection instance. Instead, the function is available in the ol/proj module, where the registry of transforms is available.

tschaub added some commits Dec 4, 2016
@tschaub tschaub Dedicated module for ol.proj.Units fd6116a
@tschaub tschaub Dedicated module for transforms cache 679fe29
@tschaub tschaub Dedicated module for projections cache b54342d
@tschaub tschaub Dedicated module for proj4 access a33caa5
@tschaub tschaub Dedicated module for ol.proj.Projection 08569d4
@tschaub tschaub One provide per proj module
@tschaub tschaub Consistently return a function or undefined
@tschaub tschaub added this to the v3.20.0 milestone Dec 6, 2016

The API change makes sense, and the restructured code looks good. Thanks @tschaub, please merge.

@tschaub tschaub merged commit fc8915d into openlayers:master Dec 6, 2016

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
coverage/coveralls Coverage increased (+0.02%) to 86.616%
@tschaub tschaub deleted the tschaub:proj branch Dec 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment