Skip to content

Commit

Permalink
Change to new transforming API
Browse files Browse the repository at this point in the history
  • Loading branch information
vidhav committed Sep 26, 2024
1 parent 522e552 commit ddd6a88
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 16 deletions.
File renamed without changes.
4 changes: 2 additions & 2 deletions dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<link rel="preload" href="fonts/glyphicons-halflings-regular.woff2" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="assets/fonts/MetaWeb-Book.woff" as="font" type="font/woff" crossorigin>
<!-- compiled CSS -->
<link rel="stylesheet" type="text/css" href="css/norgeskart3-2.0.87.css" />
<link rel="stylesheet" type="text/css" href="css/norgeskart3-2.0.88.css" />
<link rel="stylesheet" type="text/css" href="./assets/fontawesome/css/all.min.css" crossorigin>
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
Expand All @@ -19,7 +19,7 @@
<!-- End Google Tag Manager -->
<script type="text/javascript" src="https://polyfill-fastly.io/v3/polyfill.min.js?features=Function.prototype.name%2Cdefault%2Cfetch"></script>
<!-- compiled JavaScript -->
<script type="text/javascript" src="norgeskart3-2.0.87.js"></script>
<script type="text/javascript" src="norgeskart3-2.0.88.js"></script>
<script src="./assets/fontawesome/js/all.min.js" crossorigin="anonymous"></script>
<script >
// BUG orientation portrait/lanscape IOS //
Expand Down
2 changes: 1 addition & 1 deletion dist/norgeskart3-2.0.87.js → dist/norgeskart3-2.0.88.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"author": "",
"name": "norgeskart3",
"version": "2.0.87",
"version": "2.0.88",
"homepage": "https://www.norgeskart.no/",
"description": "Norgeskart3",
"keywords": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,17 +104,17 @@ angular.module('searchKoordTransPanel')

var _addSearchOptionToPanel = function (data) {
if (($scope.activePosition.resSosiKoordSys == '50') || ($scope.activePosition.resSosiKoordSys == '84')) {
$scope.activePosition.transLon = decToDMS(data.ost, 'd');
$scope.activePosition.transLat = decToDMS(data.nord, 'd');
$scope.activePosition.transLon2 = decToDMS(data.ost, 'dm');
$scope.activePosition.transLat2 = decToDMS(data.nord, 'dm');
$scope.activePosition.transLon3 = decToDMS(data.ost, 'dms');
$scope.activePosition.transLat3 = decToDMS(data.nord, 'dms');
$scope.activePosition.transLon = decToDMS(data.x, 'd');
$scope.activePosition.transLat = decToDMS(data.y, 'd');
$scope.activePosition.transLon2 = decToDMS(data.x, 'dm');
$scope.activePosition.transLat2 = decToDMS(data.y, 'dm');
$scope.activePosition.transLon3 = decToDMS(data.x, 'dms');
$scope.activePosition.transLat3 = decToDMS(data.y, 'dms');
} else {
$scope.activePosition.transLat = _round(data.nord, 2);
$scope.activePosition.transLat = _round(data.y, 2);
$scope.activePosition.transLat2 = '';
$scope.activePosition.transLat3 = '';
$scope.activePosition.transLon = _round(data.ost, 2);
$scope.activePosition.transLon = _round(data.x, 2);
$scope.activePosition.transLon2 = '';
$scope.activePosition.transLon3 = '';
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -660,8 +660,8 @@ angular
} else {
scope.showQueryPoint(
scope.contructQueryPoint(
response.data.nord,
response.data.ost,
response.data.y,
response.data.x,
"EPSG:4326",
"coordGeo",
""
Expand Down
4 changes: 3 additions & 1 deletion src/app/mainApp.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,9 @@ angular.module('mainApp')
this.generateKoordTransUrl = function (ost, nord, resSosiKoordSys, sosiKoordSys) {
resSosiKoordSys = resSosiKoordSys || 84;
sosiKoordSys = sosiKoordSys || 84;
return urlGeonorge + 'transApi?ost=' + ost + '&nord=' + nord + '&fra=' + sosiKoordSys + '&til=' + resSosiKoordSys;
var fra = this.sosiCodes.find(function (code) { return code.SOSI == sosiKoordSys; });
var til = this.sosiCodes.find(function (code) { return code.SOSI == resSosiKoordSys; });
return urlGeonorge + 'transformering/v1/transformer?x=' + ost + '&y=' + nord + '&fra=' + fra.EPSG + '&til=' + til.EPSG;
};

this.generateSeHavnivaaUrl = function (lat, lon) {
Expand Down

0 comments on commit ddd6a88

Please sign in to comment.