Hi - this is no doubt a daft question, but I have trying to use the k3 map section plugin but get the error ‘The section type “map” is not valid’ when I try to reference that section type in my blueprint.
The plugin itself seems to sometimes be called k3 map section or kn map section and I’m wondering if its even being picked up my kirby, so I wondered if there’s away to check?
Thanks for the replies. I’m wanting to show markers on a map which are added via the panel. I’ve seen the locator plugin but the other plugin looked ideal as i can save the location to a field and then fetch that like described here - the ‘Kirby GEO Plugin’ was great and I’ve used it before but sadly still only v2.
In regards to k3 plugin, i’ve added the api in my config file:
That plugin hasn’t been updated since before the official release and has been built on an earlier beta, there might have been a some changes in the core since then. Not sure if @rasteiner intends to support it.
The plugin is registered by index.php so it’ll show in your dump(), but there’s no index.js so there’ll be no JS section loaded.
Try running npm install + npm run build in the plugin’s folder, that should create the index.js and maybe get you started.
But I’m not sure to understand your issue with the Locator plugin? It definitely stores the location in a field. The answer you mention is based on this Locator plugin.
That plugin was more an experiment during the alpha and beta phases of Kirby 3. During the alpha, Kirby 3 was often referred to as “Kirby Next”, therefore “kn”. The repo on github was later renamed to “k3-”, but development pretty much stopped; there wasn’t much interest in it, 'cause it only supported the google api (out of the box), which now requires billing details to be setup.
Since then a lot has changed in Kirby, and afaik a lot will change in the near future regarding a functionality the plugin would use. (The plugin is a bit of an edge case, because it’s a section that changes the values of fields in other sections - this doesn’t normally happen - and I used some very hacky stuff to make it work).
This is most probably the problem: it’s no longer compatible with the inner workings of the panel. It throws an error and stops before it finishes registering with the panel.
The index.js should be there if you install via composer (composer gets the files from another repository) or if you download a zip file from the releases tab.
TLDR:
use Sylvain’s locator plugin - It’s much nicer to look at too
I’ll archive the repo now, and maybe rewrite it in the future when the API around “setting form values in the panel” has settled a bit more.
Thanks all for the replies and apologies for only just getting back, I’ve been away. That’s fine @rasteiner about your plugin, thanks for the info, it’s good to know. @sylvainjule in regards to the locator plugin, I was of the understanding that it only uses your current location, whereas I wanted to connect it to a maps service to look up addresses. I’ll look further into it and give it a go as you suggested.