Select to view content in your preferred language

AGOL connecting OSM API in map view

642
7
Jump to solution
04-29-2024 07:44 PM
AndrewHankinson
Regular Contributor

I have tried to add an OSM API to a map view but when I try to add following the below

>Add layer from URL

>Paste in URL 

>Select 'WMTS OGC'

I get an error - Service does not exist or is inaccessible.

When I add the same OSM API via the same method to map view classic it works fine. 

What am I missing? Is this function just not available yet in the map view?

0 Kudos
1 Solution

Accepted Solutions
David_McRitchie
Esri Contributor

Hey Andrew,

Thanks for getting back and showing a screenshot. The key itself should go under Value and the word "key" should go under Parameter. Top of my head I cannot remember if it matters if this is capitalised so I would try this in upper and lower case.

Hopefully that fixes things. I would also suggest deleting that screenshot as the API key could be used by other users viewing the thread. With OpenStreetMap I don't think this could be done maliciously, but it could lead to rate limiting if someone spammed requests to the service.

Hope that helps!

David

Esri UK -Technical Support Analyst

View solution in original post

0 Kudos
7 Replies
govardh
Deactivated User

For basic map loading, as OP is wanting, on native Android, it's free. Even for 500k+ requests. If they're using JavaScript embedded in a WebView, then that's a different story, but there's no need to use OSM for this unless you specifically do not want to use Google Maps.

0 Kudos
David_McRitchie
Esri Contributor

Hey Andrew,

Is there a key with the API? If so then this will need to be added as a custom parameter when using Map Viewer, rather than being included in the WMTS URL.

Hope that helps!
David

Esri UK -Technical Support Analyst
0 Kudos
AndrewHankinson
Regular Contributor

Hi @David_McRitchie ,

Thanks for getting back to me. 

There is an Project API key and a Project API secret key. 

I have tried to add the WMTS API Endpoint address and then entered in both of the above as a custom parameters (seperately) and I still get 'Service does not exist or is inaccessible'

I've added a screenshot for reference. 


0 Kudos
David_McRitchie
Esri Contributor

Hey Andrew,

Thanks for getting back and showing a screenshot. The key itself should go under Value and the word "key" should go under Parameter. Top of my head I cannot remember if it matters if this is capitalised so I would try this in upper and lower case.

Hopefully that fixes things. I would also suggest deleting that screenshot as the API key could be used by other users viewing the thread. With OpenStreetMap I don't think this could be done maliciously, but it could lead to rate limiting if someone spammed requests to the service.

Hope that helps!

David

Esri UK -Technical Support Analyst
0 Kudos
AndrewHankinson
Regular Contributor

Hi @David_McRitchie ,

That's got it working, thank you. 

Cheers,
Andy

0 Kudos
KarenFergason1
Occasional Contributor

I am having a similar issue - would it be possible to see the original screenshot with the API key lined out?

0 Kudos
AndrewHankinson
Regular Contributor

Here you are @KarenFergason1 

Add_OSM_API_to_map_viewer_18072024.JPG

0 Kudos