Is it possible to change the map source used my Leaflet on the Map Widget?

It is using an ESRI map by default, I would like to use OpenStreetMap… is it possible to change? how?
thanks!

If you know how to edit html and use github, you can fork the grist-widget repo and change these lines:

There was a thread about this in our discord that might be useful:

Someone enthusiastic could make this a configurable setting, since it has come up a few times, using “widget options”:

thanks for your quick answer!
And for conducting me to discord. I don’t like discord terms at all but ok I’m there now.
I have the self hosted version, so I should just find the file with the map source somewhere… have been looking for it but can’t find it yet… it should be called map/page.js?

thanks!

The custom widgets aren’t usually bundled with the source code, in order to make them easier for people to customize. Different teams often have their own sets. There is a GRIST_WIDGET_LIST_URL variable that controls where they are read from. By default, they are read from this repo, published as github pages:

Does that make any more sense?

And someone did, some time back, we just dropped the ball on reviewing. The setting should be available shortly.

cool!
So this will probably be included in release v1.1.14 ?
thanks!!

I think it does, so I would have to fork the repo, customize my own and then set up my grist install so it uses my repo and not the default one… sad thing is that I would be skipping any updates from mainstream repo…

Custom widgets are separate from the Grist app. So the update should take effect nowish (some fuzziness around browser caching etc).

1 Like

it is working beautifully! thanks!!

oops! nope… I mean, it is working, but if you close the map (for example by choosing a new table), then open the map back again, it goes back to ESRI map.
In other words, the Map configuration is not saved.

There should be a button to save the configuration - dashing to a meeting, but it would look greenish I think and be to the right at the top of the widget?

yep… I didn’t see it. Sorry. It was outside of the pop up. Now I found it. thanks!

1 Like