[ckan-dev] [ckan-global-user-group] Important: MapQuest tiles failing on spatial widgets and maps, workarounds and alternatives

Adrià Mercader adria.mercader at okfn.org
Wed Aug 3 13:32:42 UTC 2016


For an update on problems on the Recline viewer see here:
https://github.com/ckan/ckan/pull/3174#issuecomment-237216080

I've updated the default tiles on the ckanext-spatial and
ckanext-geoview widgets to use the Stamen ones for now, so these
should be fixed if you pull the latest code.

Adrià

On 28 July 2016 at 08:40, Matthew Fullerton <matt.fullerton at gmail.com> wrote:
> For some views (e.g. KML) the server switching part doesn't work and the
> thunderforest link needs to be:
>
> e.g. ckanext.spatial.common_map.custom.url =
> https://tile.thunderforest.com/transport/{z}/{x}/{y}.png
>
> or even better ckanext.spatial.common_map.custom.url =
> //tile.thunderforest.com/transport/{z}/{x}/{y}.png
>
> (http for http connection and https for https)
>
> -Matt
>
>
> On 12 July 2016 at 18:13, Adrià Mercader <adria.mercader at okfn.org> wrote:
>>
>> Hi all,
>>
>> If your favourite CKAN instance uses any of the map widgets provided
>> by ckanext-spatial or ckanext-geoview (spatial query, dataste extent,
>> GeoJSON preview, etc), chances are that you are getting an ugly image
>> from MapQuest instead of the usual base map:
>>
>> http://otile1.mqcdn.com/tiles/1.0.0/osm/0/0/0.png
>>
>> This was caused by MapQuest discontinuing support for direct access to
>> map tiles (In my opinion rather abruptly, and looking at the forums
>> the CKAN community is not the only one that has missed this):
>>
>>
>> http://devblog.mapquest.com/2016/06/15/modernization-of-mapquest-results-in-changes-to-open-tile-access/
>>
>>
>> You can provide a working alternative right now without any code
>> change, just by configuring an alternative base layer [1]. The
>> recommended options are:
>>
>> 1. MapBox. Register for an account [2] and get an access token. Then
>> set the following configuration on your ini file:
>>
>> ckanext.spatial.common_map.type = mapbox
>> ckanext.spatial.common_map.mapbox.map_id = youraccount.map-xxxxxxxx
>> ckanext.spatial.common_map.mapbox.access_token = pk.ey...
>>
>>
>> 2. Other tile providers. There are a couple of other free tile
>> providers that don't require registration or have free plans.
>> Thunderforest (http://www.thunderforest.com/) offers OSM based tiles.
>> (registration is recommended [3]). Here are the configuration options
>> that you should use:
>>
>> ckanext.spatial.common_map.type = custom
>> ckanext.spatial.common_map.custom.url =
>> https://{s}.tile.thunderforest.com/transport/{z}/{x}/{y}.png
>> ckanext.spatial.common_map.attribution = Maps © <a
>> href="http://www.thunderforest.com">Thunderforest</a>, Data © <a
>> href="http://www.openstreetmap.org/copyright">OpenStreetMap
>> contributors</a>
>>
>> Maptiles (https://maptiles.xyz/) offers two base maps based on OSM.
>> (I'd recommend clarify with the author its terms of use):
>>
>> ckanext.spatial.common_map.type = custom
>> ckanext.spatial.common_map.custom.url =
>> http://{s}.osm.maptiles.xyz/{z}/{x}/{y}.png
>> ckanext.spatial.common_map.attribution = &copy <a
>> href="http://www.openstreetmap.org/copyright"
>> target="_blank">OpenStreetMap</a> contributors. Tiles provided by <a
>> href="https://maptiles.xyz">MapTiles</a>.
>>
>>
>> Please if you are using the widgets on a production site consider
>> checking the terms for all options described here, and do not hesitate
>> to contact any of them if you have any doubts regarding usage.
>>
>> As for MapQuest support, given the new Leaflet plugin required [4] and
>> the current structure of the JS modules it is not trivial to support
>> it straight away. If someone has extra time to submit a patch that
>> allows to use the new plugin that would be great.
>>
>> In any case, it definitely seems like it should not be the default
>> option any more.
>>
>>
>> Hope this helps in the short term.
>>
>> Any question just ask.
>>
>>
>>
>> Adrià
>>
>>
>> [1]
>> http://docs.ckan.org/projects/ckanext-spatial/en/latest/map-widgets.html
>> [2] https://www.mapbox.com/pricing/
>> [3] http://www.thunderforest.com/pricing/
>> [4] https://developer.mapquest.com/documentation/leaflet-plugins
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "CKAN Global User Group" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to ckan-global-user-group+unsubscribe at googlegroups.com.
>> To post to this group, send an email to
>> ckan-global-user-group at googlegroups.com.
>> Visit this group at
>> https://groups.google.com/group/ckan-global-user-group.
>> To view this discussion on the web, visit
>> https://groups.google.com/d/msgid/ckan-global-user-group/CAGJR8iJRn%2BaNE21PGfd1b5tAgDWW-yvLECP%2B3h14Watd2NrX1Q%40mail.gmail.com.
>> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "CKAN Global User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ckan-global-user-group+unsubscribe at googlegroups.com.
> To post to this group, send email to
> ckan-global-user-group at googlegroups.com.
> Visit this group at https://groups.google.com/group/ckan-global-user-group.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/ckan-global-user-group/CAAm%2B7Tbs18waAQOutu1PWbBMvqqCWWmSJsFCwSvd06DKjwbBvA%40mail.gmail.com.
>
> For more options, visit https://groups.google.com/d/optout.



More information about the ckan-dev mailing list