Location posting from mobile to micro.blog

Soo I know it’s basically working, but I’m trying to adjust it a bit further, and add a marker at the center. Using their example, this should work, but it doesn’t:

{{ if .Params.location_latitude }}
  <img src="https://maps.geoapify.com/v1/staticmap?style=osm-bright&width=600&height=400&center=lonlat:{{ .Params.location_longitude }},{{ .Params.location_latitude }}&zoom=14&marker=lonlat:{{ .Params.location_longitude }},{{ .Params.location_latitude }};%23ff0000;size:medium&scaleFactor=2&apiKey=b50691d48f5445d5a006d1d241524816" width="600" height="400" alt="">
{{ end }}

However, without the marker bit, it does:

{{ if .Params.location_latitude }}
  <img src="https://maps.geoapify.com/v1/staticmap?style=osm-bright&width=600&height=400&center=lonlat:{{ .Params.location_longitude }},{{ .Params.location_latitude }}&zoom=14&scaleFactor=2&apiKey=b50691d48f5445d5a006d1d241524816" width="600" height="400" alt="">
{{ end }}

Is there an issue with repeating the location params twice, once for the map and once for the marker perhaps? Or maybe some syntax error I don’t see?

It looks like color: has fallen off your URL. It should be color:%23ff0000;.

Could have sworn I had it in there… but then I confused the hex code for the color with the %23, which is the hash sign… Well thanks! Works now :slight_smile:

1 Like

Hi, I hope this page may help for a non-swarm method Micro.blog Map - s p o t t h e h a l l I started out using Gluon when it had the Title field exposed despite the character count in the message, therefore grabbing the location coords could be done using a Shortcut which opened Gluon. The Google Map version is here Micro.blog GMap - s p o t t h e h a l l. These are for micro.blog hosted pages/maps, but easily changed to open externalApple/Google maps. GitHub MicroMap GitHub - spotthehall/micro.blog-map and Swarm GitHub - microdotblog/micro.blog-swarm: Links Foursquare logins via OwnYourSwarm to a micro.blog article and map. Requires Swarm and OwnYourSwarm.