So I think I spoke too soon... there's something weird going on, strange 
behavior. Here's what happens:

- I create a tiddler with a field called "point" and set the value to 
something like 24,-82
- I save the tiddler
- I can see the map, and there is a marker at the lat/long I specified
- If I close the tiddler and re-open it, it works fine (map appears as 
expected)
- But if I either reload the wiki (from the "reload" button in the sidebar) 
or refresh the page or in any way view that same tiddler again, I get a 
javascript error popup.

It says:

Internal JavaScript Error
Well, this is embarrassing. It is recommended that you restart TiddlyWiki 
by refreshing your browser
TypeError: flds.text is undefined

Looking in the javascript console, I see:

TypeError: flds.text is undefined line 15899 > eval:506:25 
<https://planet.chrisbeckstrom.com/tw/ line 15899 > eval>
    mapTiddler $:/plugins/sycom/leaflet/mapWidget.tid:506
    mapPlaces $:/plugins/sycom/leaflet/mapWidget.tid:228
    execute $:/plugins/sycom/leaflet/mapWidget.tid:188
    render $:/plugins/sycom/leaflet/mapWidget.tid:69
    renderChildren $:/core/modules/widgets/widget.js:391
    render $:/core/modules/widgets/list.js:300
    renderChildren $:/core/modules/widgets/widget.js:391
   .... .... etc ... ..

Any idea what might be causing this?

On Friday, March 6, 2020 at 10:34:03 AM UTC-5, Sycom wrote:
>
> 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/503be83b-502d-46e3-b144-7682e0037c16%40googlegroups.com.

Reply via email to