Skip to content

Commit

Permalink
use https version of epsg.io
Browse files Browse the repository at this point in the history
otherwise the library would fail if used in an https browser context
  • Loading branch information
letmaik committed Jul 15, 2016
1 parent 87a0423 commit 650b2a2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Map projection functions from standard coordinate reference system (CRS) URIs.

This library makes it easy to retrieve map projection functions from CRS URIs.
It transparently fetches transformation data from http://epsg.io and uses [proj4js](http://proj4js.org/) to generate a projection out of that.
It transparently fetches transformation data from https://epsg.io and uses [proj4js](http://proj4js.org/) to generate a projection out of that.
Once a projection has been generated, it is stored in a local cache for later use to avoid unnecessary network requests.

uriproj also supports manually adding a projection to the local cache together with its URI, either by supplying a PROJ.4 string or a `Projection` object with `forward()` and `inverse()` functions.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "uriproj",
"version": "0.2.1",
"version": "0.2.2",
"license": "BSD-3-Clause",
"description": "Map projection functions from standard coordinate reference system URIs.",
"repository": {
Expand Down
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export function get (crsUri) {

/**
* Returns a {@link Promise} that succeeds with an already stored {@link Projection} or, if not stored,
* that remotely loads the {@link Projection} (currently using http://epsg.io), stores it, and then succeeds with it.
* that remotely loads the {@link Projection} (currently using https://epsg.io), stores it, and then succeeds with it.
*
* @param {string} crsUri The CRS URI for which to return a projection.
* @return {Promise<Projection,Error>} A {@link Promise} object succeeding with a {@link Projection} object,
Expand Down Expand Up @@ -77,7 +77,7 @@ export function load (crsUri) {
}

let epsg = crsUriToEPSG(crsUri)
let url = `http://epsg.io/${epsg}.proj4`
let url = `https://epsg.io/${epsg}.proj4`

return fetch(url).then(response => {
if (!response.ok) {
Expand Down

0 comments on commit 650b2a2

Please sign in to comment.