GEOJSON - Paikkatieto

Rajapinnan kautta on saatavilla Fölin palveluiden tietoja ja sijaintikoordinaatteja. Linkeistä noudettavaa GEOJSON-muotoista paikkatietoa voi käyttää suoraan esimerkiksi Openlayers:ssä tai Leaflet:ssä.

Huomioitavaa

Esimerkkivastaus

Karttatasot :

http://data.foli.fi/geojson/layers
{
    "geojson": {
        "layers": [
            {
                "name": {
                    "fi": "Palvelupisteet",
                    "sv": "Servicekontorer",
                    "en": "Service points"
                },
                "url": "\/\/data.foli.fi\/geojson\/poi\/service_points",
                "metadata": {
                    "name": "name",
                    "popupContent": "popup",
                    "textOnly": "text"
                }
            },
    ... (snip) ...
            {
                "name": {
                    "fi": "Muut kohteet",
                    "sv": "Andra platser",
                    "en": "Other destinations"
                },
                "url": "\/\/data.foli.fi\/geojson\/poi\/other",
                "metadata": {
                    "name": "name",
                    "popupContent": "popup",
                    "textOnly": "text"
                }
            }
        ]
    }
}
	

Sijaintitiedot :

http://data.foli.fi/geojson/poi/loading_points
{
    "type": "FeatureCollection",
    "features": [
        {
            "type": "Feature",
            "id": "poi_1008",
            "geometry": {
                "type": "Point",
                "coordinates": [
                    22.26296,
                    60.45065
                ]
            },
            "properties": {
                "category": "LOADING_POINT",
                "name": "Stockmann",
                "name_fi": "Stockmann",
                "name_sv": "Stockmann",
                "name_en": "Stockmann",
                "popup": "<div class=\"card-header-wrapper\">\n <span class=\"h4\">Stockmann<\/span>\n <div class=\"card-sub-header\">Yliopistonkatu 22<\/div>\n<\/div>\n",
                "text": "Stockmann\nYliopistonkatu 22, 20100",
                "city": "Turku",
                "city_fi": "Turku",
                "city_sv": "\u00c5bo",
                "address": "Yliopistonkatu 22",
                "address_fi": "Yliopistonkatu 22",
                "address_sv": "Yliopistonkatu 22",
                "icon": {
                    "id": "icon_loading_point",
                    "svg": "<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\"\n     xmlns:xlink=\"http:\/\/www.w3.org\/1999\/xlink\"\n     width=\"256\" height=\"256\" viewBox=\"0 0 256 256\"\n     version=\"1.1\">\n  <path stroke=\"#3db7e4\" fill=\"#3db7e4\"\n\td=\"M 236 0 L 20 0 C 8 0 0 8 0 20 L 0 236 C 0 247 8 256 20 256 L 236 256 C 247 256 256 247 256 236 L 256 20 C 256 8 247 0 236 0 Z\"\/>\n  <g stroke=\"white\" fill=\"white\">\n    <path d=\"M 120 165 C 118 165 116 166 116 168 L 116 184 C 116 185 117 186 118 187 C 119 188 120 188 122 187 C 123 186 123 185 123 184 L 123 169 C 123 168 123 167 122 166 C 122 165 121 165 120 165 Z M 120 165\" \/>\n    <path d=\"M 206 116 L 158 116 C 161 110 162 103 161 96 L 146 96 C 146 99 146 102 146 105 C 145 111 141 115 134 115 C 127 115 122 111 122 105 C 122 102 122 99 122 96 C 122 81 113 71 99 69 C 83 67 70 77 69 92 C 68 99 68 107 68 114 C 68 115 68 115 68 116 L 49 116 C 46 116 43 117 41 119 C 39 122 38 124 38 128 L 38 214 C 38 217 39 220 41 222 C 43 224 46 226 49 226 L 206 226 C 209 226 212 224 214 222 C 216 220 217 217 217 214 L 217 128 C 217 124 216 122 214 119 C 212 117 209 116 206 116 Z M 134 141 C 134 145 131 148 127 148 C 124 148 121 145 121 141 C 121 137 124 135 127 135 C 129 135 131 135 132 136 C 133 138 134 139 134 141 Z M 119 141 C 119 145 116 148 112 148 C 109 148 106 145 106 141 C 106 137 109 135 112 135 C 114 135 116 135 117 136 C 118 138 119 139 119 141 Z M 84 95 C 84 91 85 87 89 86 C 98 81 107 87 107 96 C 107 97 107 98 107 99 C 107 104 107 108 108 112 C 108 113 109 115 109 116 L 83 116 C 83 115 83 115 83 114 C 84 108 83 102 84 95 Z M 100 156 C 100 156 99 157 99 157 L 85 157 C 85 157 85 157 84 157 C 84 157 84 157 84 158 L 84 163 C 84 163 84 163 84 163 C 85 163 85 163 85 163 L 99 163 C 99 163 99 164 100 164 L 100 180 C 100 180 99 180 99 180 L 85 180 C 85 180 84 181 84 182 L 84 202 C 84 202 84 203 84 203 C 84 203 83 203 83 203 L 69 203 C 68 203 68 203 68 202 L 68 141 C 68 141 68 140 69 140 L 99 140 C 99 140 100 141 100 141 Z M 137 184 C 137 197 129 203 120 203 C 110 203 102 197 102 184 L 102 168 C 102 155 110 149 120 149 C 129 149 137 155 137 168 Z M 172 202 C 172 203 171 203 171 203 L 141 203 C 141 203 140 203 140 203 C 140 202 140 202 140 202 L 140 141 C 140 141 140 140 141 140 L 155 140 C 155 140 156 140 156 140 C 156 141 156 141 156 141 L 156 185 C 156 185 156 186 156 186 L 171 186 C 171 186 171 186 171 186 C 172 186 172 186 172 187 Z M 190 202 C 190 202 190 203 189 203 L 175 203 C 175 203 174 202 174 202 L 174 141 C 174 141 174 140 175 140 L 189 140 C 190 140 190 140 190 140 C 190 141 190 141 190 141 Z M 190 202\" \/>\n    <path d=\"M 136 79 C 141 81 142 83 142 88 C 141 90 143 92 146 92 C 151 92 156 92 161 92 C 163 92 165 90 165 88 C 165 87 165 86 165 85 C 165 82 165 81 169 80 C 176 78 180 72 180 65 C 180 60 180 55 180 51 C 180 47 179 46 175 46 L 153 46 C 146 46 138 46 131 46 C 128 46 126 47 126 50 C 126 55 126 60 126 65 C 126 72 129 77 136 79 Z M 136 79\" \/>\n    <path d=\"M 145 42 C 145 36 145 30 145 24 C 145 21 143 18 140 19 C 137 18 134 21 134 24 C 134 30 134 35 134 42 Z M 145 42\" \/>\n    <path d=\"M 161 42 L 173 42 C 173 36 173 30 173 25 C 173 22 172 20 170 19 C 168 18 166 18 164 19 C 162 20 161 22 161 25 C 161 29 161 33 161 37 Z M 161 42\" \/>\n  <\/g>\n<\/svg>\n"
                }
            }
        },
        {
            "type": "Feature",
            "id": "poi_1009",
            "geometry": {
                "type": "Point",
                "coordinates": [
                    22.32387,
                    60.44604
                ]
            },
            "properties": {
                "category": "LOADING_POINT",
                "name": "Prisma It\u00e4harju",
                "name_fi": "Prisma It\u00e4harju",
                "name_sv": "Prisma It\u00e4harju",
                "name_en": "Prisma It\u00e4harju",
                "popup": "<div class=\"card-header-wrapper\">\n <span class=\"h4\">Prisma It\u00e4harju<\/span>\n <div class=\"card-sub-header\">Kalevantie 41<\/div>\n<\/div>\n",
                "text": "Prisma It\u00e4harju\nKalevantie 41, 20520",
                "city": "Turku",
                "city_fi": "Turku",
                "city_sv": "\u00c5bo",
                "address": "Kalevantie 41",
                "address_fi": "Kalevantie 41",
                "address_sv": "Kalevantie 41",
                "icon": {
                    "id": "icon_loading_point"
                }
            }
        },
 .... (snip) ...
        {
            "type": "Feature",
            "id": "poi_1010",
            "geometry": {
                "type": "Point",
                "coordinates": [
                    22.22748,
                    60.47373
                ]
            },
            "properties": {
                "category": "LOADING_POINT",
                "name": "Prisma L\u00e4nsikeskus",
                "name_fi": "Prisma L\u00e4nsikeskus",
                "name_sv": "Prisma L\u00e4nsikeskus",
                "name_en": "Prisma L\u00e4nsikeskus",
                "popup": "<div class=\"card-header-wrapper\">\n <span class=\"h4\">Prisma L\u00e4nsikeskus<\/span>\n <div class=\"card-sub-header\">Viilarinkatu 3<\/div>\n<\/div>\n",
                "text": "Prisma L\u00e4nsikeskus\nViilarinkatu 3, 20320",
                "city": "Turku",
                "city_fi": "Turku",
                "city_sv": "\u00c5bo",
                "address": "Viilarinkatu 3",
                "address_fi": "Viilarinkatu 3",
                "address_sv": "Viilarinkatu 3",
                "icon": {
                    "id": "icon_loading_point"
                }
            }
        }
    ]
}