Hi, Matt!

The html code below works in a browser:

<img style="background-image: url(
https://tile.gbif.org/3857/omt/0/0/0...@1x.png?style=gbif-classic); src="
https://api.gbif.org/v2/map/occurrence/density/0/0/0...@1x.png?style=classic.point&taxonKey=2974832
"/>

I am using it as the basis for my "poor man's" solution for displaying
distribution maps as static images outside a browser (ie., on a tailored
desktop application). The trick is to grab both images and combine them
into one!

Thanks!

With warmest regards,

Em sáb., 29 de jul. de 2023 às 05:12, Matthew Blissett via API-users <
api-users@lists.gbif.org> escreveu:

> Dear Mauro,
>
> I'm afraid this isn't possible in a single API call.  You need two calls,
> one for the land/sea basemap, and another for the occurrences:
>
> https://tile.gbif.org/3875/omt/0/0/0...@1x.png?style=gbif-classic
>
>
> https://api.gbif.org/v2/map/occurrence/density/0/0/0...@1x.png?taxonKey=2974832
>
> This can be done in static HTML but it requires an inline CSS property:
>
> <img style="background-image: 
> url(https://tile.gbif.org/3875/omt/0/0/0...@1x.png?style=gbif-classic);"  
> src="https://api.gbif.org/v2/map/occurrence/density/0/0/0...@1x.png?taxonKey=2974832";
>  >
>
> I hope that helps,
>
> Matt
> On 28/07/2023 22:07, Mauro Cavalcanti via API-users wrote:
>
> Dear ALL,
>
> I have already spent some hours now attempting to generate simple
> distribution maps using the GBIF maps API (
> https://www.gbif.org/developer/maps).
>
> I have seen the base map examples (https://tile.gbif.org/ui/) and the
> raster style demos (https://api.gbif.org/v2/map/demo.html), but could not
> understand how I could get just a simple distribution map, overlaid on a
> base map in Mercator projection and 'classic' GBIF style, as a PNG (or
> JPEG) image, *with a single API call* (that is, without css, javascript,
> etc.). Is this possible?
>
> Thanks in advance!
>
> With warmest regards,
>
> --
> Dr. Mauro J. Cavalcanti
> E-mail: mauro...@gmail.com
> Web: https://github.com/maurobio
> "Life is complex. It consists of real and imaginary parts."
>
> _______________________________________________
> API-users mailing 
> listapi-us...@lists.gbif.orghttps://lists.gbif.org/mailman/listinfo/api-users
>
> _______________________________________________
> API-users mailing list
> API-users@lists.gbif.org
> https://lists.gbif.org/mailman/listinfo/api-users
>


-- 
Dr. Mauro J. Cavalcanti
E-mail: mauro...@gmail.com
Web: https://github.com/maurobio
"Life is complex. It consists of real and imaginary parts."
_______________________________________________
API-users mailing list
API-users@lists.gbif.org
https://lists.gbif.org/mailman/listinfo/api-users

Reply via email to