<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Thanks Ken-ichi,<div><br></div><div>Coincidentally, I see the vector maps are picking up pace quickly with ESRI announcing support last week:</div><div>  <a href="https://www.mapbox.com/blog/vector-tile-adoption/">https://www.mapbox.com/blog/vector-tile-adoption/</a></div><div><br></div><div>I expect this is going to change the way we all build mapping interfaces in the very near future.</div><div><br></div><div>Cheers,</div><div>Tim</div><div><br></div><div><br></div><div><br><div><div>On 19 Mar 2015, at 06:32, Ken-ichi <<a href="mailto:kenichi.ueda@gmail.com">kenichi.ueda@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Thanks, Tim. Obviously you guys are more reactive than I am! Patrick<br>and I agree that doing API calls for every click on the map is a bit<br>much, especially considering we have other clickable stuff on every<br>map where we show the GBIF layer, so we'll wait until you guys put<br>something together. If you go down the vector tile path, hopefully we<br>can learn from what you implement!<br><br>-ken-ichi<br><br>On Tue, Mar 17, 2015 at 1:49 AM, Tim Robertson <<a href="mailto:trobertson@gbif.org">trobertson@gbif.org</a>> wrote:<br><blockquote type="cite">Hi Ken Ichi<br><br>We have given it some thought, but it hasn’t yet got to the a priority where we’ve put serious effort to implement it.<br><br>We’d likely do one of:<br><br>a) a proximity search in the occurrence search API (currently there is polygon only) which is served from SOLR<br>b) a custom solution using HBase which serves the maps.  Effectively being a key value pair store, this comes with some limitation<br>  - this would serve up something like the UTFGrid or offer a custom JSON service / list by location service<br>c) taking the hit and doing mapbox vector tiles, and going for webgl<br><br>The way all the map work is going these days, c) is probably the correct way to do it and I have some prototypes of this.  Vector tiles all use protobuf, whereas we built using Apache Avro for our encoding format.<br><br>The reality is though, we are unlikely to get to working on maps for the next 6 months or so as we have a pretty heavy workload between now and the governing board.  We might be able to get a) into the API sooner and I’ll discuss that with the team here.<br><br>The only workaround in the meantime would be to do a small bounding box search, such as the following:<br>  <a href="http://api.gbif.org/v1/occurrence/search?GEOMETRY=POLYGON">http://api.gbif.org/v1/occurrence/search?GEOMETRY=POLYGON</a>((-121.407165 35.855665,-121.407165 35.844534,-121.393432 35.844534,-121.393432 35.855665,-121.407165 35.855665))<br><br>By using this, you could construct a small area around where the user clicked, run a search on click, and then you have the coordinates in the response to inspect if you *really* need to match a point.<br>Is that reasonable for the time being?<br><br>I’m sorry we can’t be more reactive.<br><br>Congratulations to you and Patrick on the work - looks great.<br><br>Cheers,<br>Tim<br><br><br><br>On 16 Mar 2015, at 22:30, Ken-ichi <<a href="mailto:kenichi.ueda@gmail.com">kenichi.ueda@gmail.com</a>> wrote:<br><br><blockquote type="cite">Hi all,<br><br>We just added GBIF tiles as an optional overlay to many of our maps at<br><a href="http://iNaturalist.org">iNaturalist.org</a>, e.g.<br><a href="http://www.inaturalist.org/taxa/27818-Taricha-torosa/map">http://www.inaturalist.org/taxa/27818-Taricha-torosa/map</a>. They're<br>great and the API works perfectly, but the first thing people want to<br>do when they see this data is click on those points! Has anyone at<br>GBIF or elsewhere given some thought to how to implement that?<br><br>The easiest way to do this from our perspective would be for GBIF to<br>implement a UTFGrid endpoint for their tiles<br>(<a href="https://github.com/mapbox/utfgrid-spec">https://github.com/mapbox/utfgrid-spec</a>). The corresponding JSON<br>wouldn't have to include all the occurrences (which would probably be<br>a lot) but it could include 1 page of occurrences, or just a bounding<br>box clients could use to generate a link to retrieve the corresponding<br>data on GBIF.<br><br>Another method I was thinking about was to make a custom tile overlay<br>composed of HTML canvas elements, load the tile image onto the canvas,<br>and use clicks to get the RGBA values of the corresponding pixel at<br>the click coordinates to see if there was any color there. If alpha ==<br>1, then retrieve corresponding occurrences from the GBIF occurrences<br>API using the bounding box implied by the pixel at that zoom level.<br>Canvases have been used as overlays in Google Maps, at least (e.g.<br><a href="https://github.com/brendankenny/CanvasLayer">https://github.com/brendankenny/CanvasLayer</a>), and I'm sure in other<br>frontend map frameworks as well, but I'm not sure what the performance<br>would be like.<br><br>Other ideas?<br><br>-ken-ichi<br>_______________________________________________<br>API-users mailing list<br><a href="mailto:API-users@lists.gbif.org">API-users@lists.gbif.org</a><br>http://lists.gbif.org/mailman/listinfo/api-users<br><br></blockquote><br></blockquote><br></blockquote></div><br></div></body></html>