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

Nikolas Becker nikolas at viderum.com
Mon Jul 18 13:24:38 UTC 2016


Hi David,

By option 3 do you mean maptiles.xyz or which one?

Best,
Nikolas

Nikolas Becker
Product Manager

--
Viderum<http://www.viderum.com/> – an Open Knowledge company
Making the world’s public data discoverable and accessible to everyone
http://www.viderum.com/  |  @videruminc<https://twitter.com/videruminc>


From: ckan-dev <ckan-dev-bounces at lists.okfn.org> on behalf of David Hernández <davisoski at gmail.com>
Reply-To: CKAN Development Discussions <ckan-dev at lists.okfn.org>
Date: Samstag, 16. Juli 2016 um 21:02
To: "ckan-dev at lists.okfn.org" <ckan-dev at lists.okfn.org>
Subject: Re: [ckan-dev] [ckan-global-user-group] Re: Important: MapQuest tiles failing on spatial widgets and maps, workarounds and alternatives


Hi.

I use option 3 and works ok, but for csv files with [lat,lon] coordinates I still getting the ugly image using the map option in Data Explorer.

This is one of these files:

http://demo.ckan.org/dataset/test-for-mat/resource/f2c76d4b-a858-4775-b30d-738cc3da477f

Is there any workaround for this stuff?

Thanks.

David.



El 13/7/16 a las 13:33, stefan.stegemann at ble.de<mailto:stefan.stegemann at ble.de> escribió:
Thanks a lot, I've been looking for a solution so I'll try the first option you've proposed.

Am Dienstag, 12. Juli 2016 18:13:11 UTC+2 schrieb Adri? Mercader:
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<http://tile.thunderforest.com/transport/%7Bz%7D/%7Bx%7D/%7By%7D.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<http://osm.maptiles.xyz/%7Bz%7D/%7Bx%7D/%7By%7D.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<mailto:ckan-global-user-group+unsubscribe at googlegroups.com>.
To post to this group, send email to ckan-global-user-group at googlegroups.com<mailto: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/9eac8b01-7565-4dc1-a303-3492740ffe07%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20160718/565c1592/attachment-0003.html>


More information about the ckan-dev mailing list