Hi Beckstrom,
if your tiddler is actually a geoTiddler (i.e. it has at least one point(s),
line(s), polygon(s), place or geojson field) it should automatically
display a map at the bottom of the tiddler.
This behaviour is defined through the
$:/plugins/sycom/leaflet/templates/geoTiddler tiddler. You may edit this
one to modify default appearance of the map or disable it.
I'm not sure how your wiki works or what you want to do. If you have
geoTiddlers you can map them directly :
<$leafmap places='{"tiddler":"Belgium"}' />
or through a filter
<$leafmap places='{"filter":"[tag[country]tag[Europe]]"}' />
Due to leaflet map widget syntax, I'm afraid that "dynamic call" should be
made through macros you will have to define locally or globally (see
https://tiddlywiki.com/#Macro%20Definitions%20in%20WikiText). Very unsure
about your success with this strategy since the plugin was not designed for
this...
If this is not the behaviour you expected, feel free to share (a part of)
your wiki and describe what you want to achieve. I have not much time now
since I just started a new job, but I will try to help you asap.
cheers,
Sylvain
@sycom
Le vendredi 6 mars 2020 13:53:41 UTC+1, Beckstrom a écrit :
>
> Hi all,
>
> First of all this is probably the most awesome and useful piece of
> software I’ve ever used. I love it!
>
> I’ve been trying to figure out how to include a map automatically in any
> tiddler that is a “place,” for instance “starbucks on main” or “Belgium.”
> I’ve been trying to use the Leaflet Maps plugin from here:
> http://sycom.github.io/TiddlyWiki-Plugins/
>
> According to the docs, if you add a field called “point” or “points” and
> put a comma separated list of the lat/lon(eg 45.3347,-85.72882) you can
> access the field and generate the map
>
> It works if I hardcore latitude and longitude when I call the widget, like
> this:
>
> <$leafmap tile='sat'
> places='{"point":"6.5,19.72" />
>
> but i can’t figure out how to dynamically access the “point” field for
> tiddlers. I’ve tried all sorts of things, such as
>
> <$leafmap tile='sat'
> places='{"point":"{{!!point}}" />
>
> It seems like no matter what i do, the variable is not expanded because of
> the double quotes inside the json.
>
> Any idea how I could make this work? Please and thanks in advance for your
> help!!
>
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/7302965a-32aa-4709-ab95-2e73424a8f4d%40googlegroups.com.