[gnome-maps/wip/mlundblad/location-bias-scale: 1/5] Rename PhotonParser module




commit 11e81c982fa56e9923c344fbec991ca1bdc400ba
Author: Marcus Lundblad <ml dfupdate se>
Date:   Fri Jun 10 22:16:42 2022 +0200

    Rename PhotonParser module
    
    Rename the module to PhotonUtils to prepare
    for adding the common location bias scale
    parameter constant.

 src/graphHopperGeocode.js               | 4 ++--
 src/org.gnome.Maps.src.gresource.xml.in | 2 +-
 src/overpass.js                         | 4 ++--
 src/photonGeocode.js                    | 4 ++--
 src/{photonParser.js => photonUtils.js} | 0
 5 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/src/graphHopperGeocode.js b/src/graphHopperGeocode.js
index ebd06aad..1740f6a3 100644
--- a/src/graphHopperGeocode.js
+++ b/src/graphHopperGeocode.js
@@ -24,7 +24,7 @@ import Soup from 'gi://Soup';
 
 import {Application} from './application.js';
 import * as HTTP from './http.js';
-import * as PhotonParser from './photonParser.js';
+import * as PhotonUtils from './photonUtils.js';
 import * as Service from './service.js';
 import * as Utils from './utils.js';
 
@@ -131,7 +131,7 @@ export class GraphHopperGeocode {
         let lat = hit.point.lat;
         let lon = hit.point.lng;
 
-        return PhotonParser.parsePlace(lat, lon, hit);
+        return PhotonUtils.parsePlace(lat, lon, hit);
     }
 
     _buildURL(string, latitude, longitude) {
diff --git a/src/org.gnome.Maps.src.gresource.xml.in b/src/org.gnome.Maps.src.gresource.xml.in
index 72832808..72a4b3bc 100644
--- a/src/org.gnome.Maps.src.gresource.xml.in
+++ b/src/org.gnome.Maps.src.gresource.xml.in
@@ -49,7 +49,7 @@
     <file>osmUtils.js</file>
     <file>overpass.js</file>
     <file>photonGeocode.js</file>
-    <file>photonParser.js</file>
+    <file>photonUtils.js</file>
     <file>place.js</file>
     <file>placeBar.js</file>
     <file>placeButtons.js</file>
diff --git a/src/overpass.js b/src/overpass.js
index 1766a2ee..039cb4e6 100644
--- a/src/overpass.js
+++ b/src/overpass.js
@@ -22,7 +22,7 @@ import GObject from 'gi://GObject';
 import Soup from 'gi://Soup';
 
 import * as OSMNames from './osmNames.js';
-import * as PhotonParser from './photonParser.js';
+import * as PhotonUtils from './photonUtils.js';
 import {Place} from './place.js';
 import * as Utils from './utils.js';
 
@@ -118,7 +118,7 @@ export class Overpass extends GObject.Object {
         let [lat, lon] = this._getCoordsFromElement(element);
         let photonProperties =
             this._getPhotonProperties(element.tags, osmType, osmId);
-        let place = PhotonParser.parsePlace(lat, lon, photonProperties);
+        let place = PhotonUtils.parsePlace(lat, lon, photonProperties);
 
         this._populatePlace(place, overpassData);
         place.prefilled = true;
diff --git a/src/photonGeocode.js b/src/photonGeocode.js
index 6065a876..a4b6045d 100644
--- a/src/photonGeocode.js
+++ b/src/photonGeocode.js
@@ -24,7 +24,7 @@ import Soup from 'gi://Soup';
 
 import {Application} from './application.js';
 import * as HTTP from './http.js';
-import * as PhotonParser from './photonParser.js';
+import * as PhotonUtils from './photonUtils.js';
 import * as Service from './service.js';
 import * as Utils from './utils.js';
 
@@ -129,7 +129,7 @@ export class PhotonGeocode {
     _parseFeature(feature) {
         let [lon, lat] = feature.geometry.coordinates;
 
-        return PhotonParser.parsePlace(lat, lon, feature.properties);
+        return PhotonUtils.parsePlace(lat, lon, feature.properties);
     }
 
     _buildURL(string, latitude, longitude) {
diff --git a/src/photonParser.js b/src/photonUtils.js
similarity index 100%
rename from src/photonParser.js
rename to src/photonUtils.js


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]