From: Joel N. <joe...@gm...> - 2014-06-28 19:32:53
|
While we wait for cached geocoding in Maps/Semantic Maps, here's a workaround using ExternalData {{#get_web_data:url= http://api.geonames.org/search?q=Berlin&maxRows=1&username=<USERNAME> |format=XML |data=geonameLat=/geonames/geoname/lat,geonameLng=/geonames/geoname/lng |use xpath|cache seconds= 172800 }} {{#set:Has Coordinates= {{#external_value:geonameLat}}, {{#external_value:geonameLng}} }} where <USERNAME> is your geonames login with the free API service enabled. Note that with "cache seconds" set to 2 days, this should help you stay below the geonames daily limit. Best, Joel ======================================================= Think Different! (http://en.wikipedia.org/wiki/Think_different#Text) Imagine Different! (http://www.youtube.com/watch?v=H5tOgRD4EqY) On Fri, Jun 27, 2014 at 3:31 PM, Jeroen De Dauw <jer...@gm...> wrote: > Hey, > > BTW, I noticed that with a lot of geocoding, you eventually hit the quota >> limit on the geocoders, especially during Template development which can >> generates hundreds of geocoding requests per edit. It seems to be a >> recurring thread for people using Maps. >> >> Is there any thought/opinion of caching geocoding requests, perhaps in >> MemCache? >> > > https://github.com/JeroenDeDauw/Maps/issues?labels=geocoding > > Seems like something suitable for a GSoC project. > > Cheers > > -- > Jeroen De Dauw - http://www.bn2vs.com > Software craftsmanship advocate > Evil software architect at Wikimedia Germany > ~=[,,_,,]:3 > |