Changeset 35831 in osm for applications/editors


Ignore:
Timestamp:
2021-10-21T13:40:05+02:00 (3 years ago)
Author:
Don-vip
Message:

update Cadastre API endpoint

see https://twitter.com/ThomasG77/status/1451145474111688708

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/cadastre-fr/src/org/openstreetmap/josm/plugins/fr/cadastre/api/CadastreAPI.java

    r35727 r35831  
    1717
    1818import org.openstreetmap.josm.data.Bounds;
     19import org.openstreetmap.josm.data.preferences.StringProperty;
    1920import org.openstreetmap.josm.io.OsmApiException;
    2021import org.openstreetmap.josm.tools.HttpClient;
     
    2728public final class CadastreAPI {
    2829
    29     private static final String API_ENDPOINT = "https://sandbox.geo.api.gouv.fr/cadastre";
     30    private static final StringProperty API_ENDPOINT = new StringProperty(
     31            "cadastrefr.api.endpoint", "https://geo.api.gouv.fr/cadastre");
    3032
    3133    private CadastreAPI() {
     
    5355     */
    5456    public static Set<String> getSheets(double minlon, double minlat, double maxlon, double maxlat) throws IOException {
    55         URL url = new URL(API_ENDPOINT + "/feuilles?bbox=" + String.join(",",
     57        URL url = new URL(API_ENDPOINT.get() + "/feuilles?bbox=" + String.join(",",
    5658                Double.toString(minlon), Double.toString(minlat), Double.toString(maxlon), Double.toString(maxlat)));
    5759        try {
Note: See TracChangeset for help on using the changeset viewer.