Mapillary image is not shown when feature is tagged with a recent Mapillary image key #364

Closed
opened 2021-06-19 09:43:25 +02:00 by seppesantens · 2 comments
seppesantens commented 2021-06-19 09:43:25 +02:00 (Migrated from github.com)

Mapillary has changed the format of their image key, it now only contains numbers (it used to contain both numbers and letters). This new format seems to break showing the Mapillary image in MapComplete. Features tagged with the old key format still show correctly.
Here's an example

Mapillary has changed the format of their image key, it now only contains numbers (it used to contain both numbers and letters). This new format seems to break showing the Mapillary image in MapComplete. Features tagged with the old key format still show correctly. [Here's an example](https://mapcomplete.osm.be/?z=15&lat=50.9835&lon=3.811965&userlayout=https%3A%2F%2Fraw.githubusercontent.com%2Fseppesantens%2FMapComplete-Themes%2Fmain%2FOpenWindPowerMap%2FOpenWindPowerMap.json#node/4577387718)
pietervdvn commented 2021-09-15 00:08:57 +02:00 (Migrated from github.com)

Some example code for reference:

const client_token = "MLY|4441509239301885|b40ad2d3ea105435bd40c7e76993ae85"

const image_id = '196804715753265';
const api_url = 'https://graph.mapillary.com/' + image_id + '?fields=thumb_1024_url&&access_token=' + client_token;
fetch(api_url,
    {
        headers: {'Authorization': 'OAuth ' + client_token}
    }
).then(response => {
    return response.json()
}).then(
    json => {
        const thumbnail_url = json["thumb_1024"]
        console.log(thumbnail_url)
    }
)
Some example code for reference: ``` const client_token = "MLY|4441509239301885|b40ad2d3ea105435bd40c7e76993ae85" const image_id = '196804715753265'; const api_url = 'https://graph.mapillary.com/' + image_id + '?fields=thumb_1024_url&&access_token=' + client_token; fetch(api_url, { headers: {'Authorization': 'OAuth ' + client_token} } ).then(response => { return response.json() }).then( json => { const thumbnail_url = json["thumb_1024"] console.log(thumbnail_url) } ) ```
seppesantens commented 2021-09-15 07:53:37 +02:00 (Migrated from github.com)

Thanks!!

Thanks!!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: MapComplete/MapComplete#364
No description provided.