old api resources

36 views
Skip to first unread message

Jane Schindler

unread,
Sep 5, 2022, 12:42:23 PM9/5/22
to GeoAdminCh API
I've used the old API with delight for years in web development vor various Swiss non profits and cultural institutions (for example fib.ch). Recently a couple of our implementations went down since we'd referenced scripts that the old "ga loader" loaded itself from https://public.geo.admin.ch/resources/api/4.4.2/[resource] (code below). It seems these no longer exist.

I replaced these assets with local copies, and now my old implementations are working again. Obviously I should move clients to the open layers implementation, but I need to plan when. My current question is: will the tiles located at for example https://wmts9.geo.admin.ch/1.0.0/ch.swisstopo.pixelkarte-grau/default/current/2056/15/0/0.jpeg continue to be available, or do you have plans to move them / make them obsolete?

If its not urgent we will plan to move to regular openlayers this year, otherwise we might wait. 

Thanks a lot
Jane

Resources that no longer exist, at least publicly. 

document.write('<link rel="stylesheet" type="text/css" href="https://public.geo.admin.ch/resources/api/4.4.2/ga.css" />');
if ('None' != 'true') {
  document.write('<scr' + 'ipt type="text/javascript" src="https://cdn.polyfill.io/v2/polyfill.min.js?features=fetch,requestAnimationFrame,Element.prototype.classList,URL"></scr' + 'ipt>');
}
document.write('<scr' + 'ipt type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/proj4js/2.2.1/proj4.js"></scr' + 'ipt>');
document.write('<scr' + 'ipt type="text/javascript" src="https://public.geo.admin.ch/resources/api/4.4.2/EPSG21781.js"></scr' + 'ipt>');
document.write('<scr' + 'ipt type="text/javascript" src="https://public.geo.admin.ch/resources/api/4.4.2/EPSG2056.js"></scr' + 'ipt>');
document.write('<scr' + 'ipt type="text/javascript" src="https://public.geo.admin.ch/resources/api/4.4.2/ga-debug.js"></scr' + 'ipt>');
})();

GeoAdminCh API

unread,
Sep 6, 2022, 3:59:05 AM9/6/22
to GeoAdminCh API
Hi, 

You are using with https://public.geo.admin.ch/resources/api/4.4.2/[resource] a non offical ressource please use the loader.js and the ressources as stated in   https://api.geo.admin.ch/api/doc.html 

The WMTS ressources  are documented in https://api.geo.admin.ch/services/sdiservices.html#wmts  : if you stick to https://wmts.geo.admin.ch/1.0.0/ch.swisstopo.pixelkarte-grau/default/current/2056/15/0/0.jpeg you will not encounter problems in the future


David

Nicola Fankhauser

unread,
Sep 6, 2022, 11:05:35 AM9/6/22
to GeoAdminCh API
Hi all

I've got a similar productive issue with an implementation that's a bit older. The following files are not available anymore it seems:

thanks & best regards
Nicola 

Jane Schindler

unread,
Sep 6, 2022, 11:28:20 AM9/6/22
to GeoAdminCh API
David says it does, but I'm not sure it will because if I go to https://api3.geo.admin.ch/resources/api/4.4.2/ga.js (which is called in the loader he references - https://api3.geo.admin.ch/loader.js?version=4.4.2) it says access denied. 
@David which loader js do you think is the one that does work? Thanks.
If there is a version from geoadmin that is accessible, this will definitely be the best solution.

I downloaded the old versions of all these files locally and that works for me. Very stupid, but I had to get them from the web archive. I have versions at https://ferienimbaudenkmal.ch/wp-content/plugins/geoadmin-map-2.0/geoadmin-loader-4.4.2.js and all the other files are listed at the end. You can't load these directly but you can copy them if you want. 

David...@swisstopo.ch

unread,
Sep 6, 2022, 11:44:06 AM9/6/22
to geoadm...@googlegroups.com

Hi

 

Can you give me an IP range which can not access

https://api3.geo.admin.ch/resources/api/4.4.2/ga.js

?

 

Since this works from our side ..

 

David

--
You received this message because you are subscribed to a topic in the Google Groups "GeoAdminCh API" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/geoadmin-api/D6k-MGNoHPA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to geoadmin-api...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/geoadmin-api/3d50adf5-da86-43f0-83e2-01a82d108dccn%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages