From 650b2a24a36b3cad69c04914e5564169738a839a Mon Sep 17 00:00:00 2001 From: Maik Riechert Date: Fri, 15 Jul 2016 19:22:10 +0200 Subject: [PATCH] use https version of epsg.io otherwise the library would fail if used in an https browser context --- README.md | 2 +- package.json | 2 +- src/index.js | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 8de024b..f874d1c 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/package.json b/package.json index 8cf17d1..8cb2218 100644 --- a/package.json +++ b/package.json @@ -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": { diff --git a/src/index.js b/src/index.js index 1cd44df..2a56e0a 100644 --- a/src/index.js +++ b/src/index.js @@ -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} A {@link Promise} object succeeding with a {@link Projection} object, @@ -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) {