<div dir="ltr"><div>Hi, Matt!</div><div><br></div><div>The html code below works in a browser:<br></div><div><br></div><div><img style="background-image: url(<a href="https://tile.gbif.org/3857/omt/0/0/0@1x.png?style=gbif-classic" target="_blank">https://tile.gbif.org/3857/omt/0/0/0@1x.png?style=gbif-classic</a>); src="<a href="https://api.gbif.org/v2/map/occurrence/density/0/0/0@1x.png?style=classic.point&taxonKey=2974832" target="_blank">https://api.gbif.org/v2/map/occurrence/density/0/0/0@1x.png?style=classic.point&taxonKey=2974832</a>"/></div><div><br></div><div>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! <br></div><div><br></div><div>Thanks!</div><div><br></div><div>With warmest regards,<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Em sáb., 29 de jul. de 2023 às 05:12, Matthew Blissett via API-users <<a href="mailto:api-users@lists.gbif.org" target="_blank">api-users@lists.gbif.org</a>> escreveu:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<p>Dear Mauro,</p>
<p>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:</p>
<p><a href="https://tile.gbif.org/3875/omt/0/0/0@1x.png?style=gbif-classic" target="_blank">https://tile.gbif.org/3875/omt/0/0/0@1x.png?style=gbif-classic</a><br>
</p>
<p><a href="https://api.gbif.org/v2/map/occurrence/density/0/0/0@1x.png?taxonKey=2974832" target="_blank">https://api.gbif.org/v2/map/occurrence/density/0/0/0@1x.png?taxonKey=2974832</a></p>
<p>This can be done in static HTML but it requires an inline CSS
property:<br>
</p>
<pre id="m_5869571217364671897m_6646462846068488965line1"><span><<span>img </span><span>style</span>="<a>background-image: url(https://tile.gbif.org/3875/omt/0/0/0@1x.png?style=gbif-classic);</a>"
<span id="m_5869571217364671897m_6646462846068488965line476"></span> <span>src</span>="<a>https://api.gbif.org/v2/map/occurrence/density/0/0/0@1x.png</a>?taxonKey=2974832" ></span><span></span><span></span></pre>
<p></p>
<p>I hope that helps,</p>
<p>Matt<br>
</p>
<div>On 28/07/2023 22:07, Mauro Cavalcanti
via API-users wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>Dear ALL,</div>
<div><br>
</div>
<div>I have already spent some hours now attempting to generate
simple distribution maps using the GBIF maps API (<a href="https://www.gbif.org/developer/maps" target="_blank">https://www.gbif.org/developer/maps</a>).</div>
<div><br>
</div>
<div>I have seen the base map examples (<a href="https://tile.gbif.org/ui/" target="_blank">https://tile.gbif.org/ui/</a>)
and the raster style demos (<a href="https://api.gbif.org/v2/map/demo.html" target="_blank">https://api.gbif.org/v2/map/demo.html</a>),
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,
<b>with a single API call</b> (that is, without css,
javascript, etc.). Is this possible?</div>
<div><br>
</div>
<div>Thanks in advance!</div>
<div><br>
</div>
<div>With warmest regards,<br>
</div>
<div><br>
<span class="gmail_signature_prefix">-- </span><br>
<div dir="ltr" class="gmail_signature">
<div dir="ltr">Dr. Mauro J. Cavalcanti<br>
E-mail: <a href="mailto:maurobio@gmail.com" target="_blank">maurobio@gmail.com</a><br>
Web: <a href="https://github.com/maurobio" target="_blank">https://github.com/maurobio</a><br>
"Life is complex. It consists of real and imaginary
parts."</div>
</div>
</div>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
API-users mailing list
<a href="mailto:API-users@lists.gbif.org" target="_blank">API-users@lists.gbif.org</a>
<a href="https://lists.gbif.org/mailman/listinfo/api-users" target="_blank">https://lists.gbif.org/mailman/listinfo/api-users</a>
</pre>
</blockquote>
</div>
_______________________________________________<br>
API-users mailing list<br>
<a href="mailto:API-users@lists.gbif.org" target="_blank">API-users@lists.gbif.org</a><br>
<a href="https://lists.gbif.org/mailman/listinfo/api-users" rel="noreferrer" target="_blank">https://lists.gbif.org/mailman/listinfo/api-users</a><br>
</blockquote></div><br clear="all"><br><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr">Dr. Mauro J. Cavalcanti<br>E-mail: <a href="mailto:maurobio@gmail.com" target="_blank">maurobio@gmail.com</a><br>Web: <a href="https://github.com/maurobio" target="_blank">https://github.com/maurobio</a><br>"Life is complex. It consists of real and imaginary parts."</div></div>