Skip to content

Commit

Permalink
osmApi: switch to api.openstreetmap.org API host (#194)
Browse files Browse the repository at this point in the history
  • Loading branch information
danieldegroot2 authored Oct 12, 2023
1 parent d02edd8 commit 69431e8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/services/osmApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import { getSchemaForFeature } from './tagging/idTaggingScheme';
import { fetchSchemaTranslations } from './tagging/translations';

const getOsmUrl = ({ type, id }) =>
`https://www.openstreetmap.org/api/0.6/${type}/${id}.json`;
`https://api.openstreetmap.org/api/0.6/${type}/${id}.json`;
const getOsmHistoryUrl = ({ type, id }) =>
`https://www.openstreetmap.org/api/0.6/${type}/${id}/history.json`;
`https://api.openstreetmap.org/api/0.6/${type}/${id}/history.json`;

// Overpass API is used only for getting cetroids of ways and relations
const getOverpassUrl = ({ type, id }) => {
Expand Down Expand Up @@ -146,7 +146,7 @@ export const insertOsmNote = async (point: Position, text: string) => {
body.append('text', text);

const osmUrl = prod
? 'https://www.openstreetmap.org'
? 'https://api.openstreetmap.org'
: 'https://master.apis.dev.openstreetmap.org';

// {"type":"Feature","geometry":{"type":"Point","coordinates":[14.3244982,50.0927863]},"properties":{"id":26569,"url":"https://master.apis.dev.openstreetmap.org/api/0.6/notes/26569.json","comment_url":"https://master.apis.dev.openstreetmap.org/api/0.6/notes/26569/comment.json","close_url":"https://master.apis.dev.openstreetmap.org/api/0.6/notes/26569/close.json","date_created":"2021-04-17 10:37:44 UTC","status":"open","comments":[{"date":"2021-04-17 10:37:44 UTC","action":"opened","text":"way/39695868! Place was marked permanently closed.From https://osmapp.org/way/39695868","html":"\u003cp\u003eway/39695868! Place was marked permanently closed.From \u003ca href=\"https://osmapp.org/way/39695868\" rel=\"nofollow noopener noreferrer\"\u003ehttps://osmapp.org/way/39695868\u003c/a\u003e\u003c/p\u003e"}]}}
Expand Down
2 changes: 1 addition & 1 deletion src/services/osmApiAuth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const {
} = getConfig();

const osmUrl = prod
? 'https://www.openstreetmap.org'
? 'https://api.openstreetmap.org'
: 'https://master.apis.dev.openstreetmap.org';

const oauth = prod
Expand Down

1 comment on commit 69431e8

@vercel
Copy link

@vercel vercel bot commented on 69431e8 Oct 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

osmapp – ./

osmapp.vercel.app
osmapp-zbycz.vercel.app
osmapp.org
osmapp-git-master-zbycz.vercel.app

Please sign in to comment.