Narrowing the Scope of the Blog/Observation Widget

(I apologize if I’ve missed information, but I haven’t found any recent posts on this.) I want to use the Blog/Observation Widget in a website, but I want to restrict the feed to just my Observations in a particular location.

I’m not a programmer-type. Is there a straightforward way to do this restriction? Thanks in advance for any guidance.

1 Like

if you’re starting from the observation widget page (https://www.inaturalist.org/observations/widget), click the “from a place” option, and select your place. then generate your new widget.

2 Likes

Thank you. I tried that, but hit 2 issues:
1 – It wouldn’t recognize the Place I want to target (North Pawlet, VT, USA)
2 – If I put in any location as a test, then it would feed observations from everyone, not just mine.

this place doesn’t exist within iNaturalist. there may be a place in Google Maps that you use which is translated to a rectangular boundary when you query in iNaturalist. or you could use the next best existing place in iNaturalist, such as Pawlet.

so if you want precise boundaries, you’ll need to create an actual place in the system. or if you are fine with using less precise boundaries, you can use a rectangular boundary instead.

ok. try this instead. start with the widget for your observations
you’ll get HTML code for your widget that includes a <script> tag that looks something like this:

<script type="text/javascript" charset="utf-8" src="https://www.inaturalist.org/observations/grnmtn.widget?layout=large&limit=5&order=desc&order_by=observed_on"></script>

if you are using an iNaturalist place, just add &place_id=123 to the end of the src value, replacing 123 with whatever the ID of the place is in iNaturalist. for example, if you wanted to use Vermont (=47) as your place, your new script tag would look something like this:

<script type="text/javascript" charset="utf-8" src="https://www.inaturalist.org/observations/grnmtn.widget?layout=large&limit=5&order=desc&order_by=observed_on&place_id=47"></script>

if you’re using a rectangular boundary, add &nelat=2&nelng=-12&swlat=1&swlng=-123 to the end of the src value, replacing the coordinates with appropriate ones that represent the northeast and southwest coordinates of the rectangular boundary. for example:

<script type="text/javascript" charset="utf-8" src="https://www.inaturalist.org/observations/grnmtn.widget?layout=large&limit=5&order=desc&order_by=observed_on&nelat=43.384200&nelng=-73.202648&swlat=43.381501&swlng=-73.205345"></script>

you will also want to find the link to your other observations, which will be represented in an anchor tag that looks something like this:

 <a href="https://www.inaturalist.org/observations/grnmtn">View grnmtn's observations »</a>

add your place or bounding box as a parameter in the href value and (optionally) modify the anchor text for example:

<a href="https://www.inaturalist.org/observations/grnmtn?nelat=43.384200&nelng=-73.202648&swlat=43.381501&swlng=-73.205345">View grnmtn's observations from custom area»</a>

you can also link to the Explore page instead of your observation edit page instead by pointing to the Explore page, like so:

<a href="https://www.inaturalist.org/observations?user_id=grnmtn&nelat=43.384200&nelng=-73.202648&swlat=43.381501&swlng=-73.205345">View grnmtn's observations from custom area»</a>
1 Like