Skip to content

Commit

Permalink
Rename PhotonParser module
Browse files Browse the repository at this point in the history
Rename the module to PhotonUtils to prepare
for adding the common location bias scale
parameter constant.
  • Loading branch information
mlundblad committed Jun 19, 2022
1 parent 0bb523e commit 4c2c1ab
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/graphHopperGeocode.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion src/org.gnome.Maps.src.gresource.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
4 changes: 2 additions & 2 deletions src/overpass.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/photonGeocode.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -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) {
Expand Down
File renamed without changes.

0 comments on commit 4c2c1ab

Please sign in to comment.