Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Admin ui not displays the map on the field #14

Open
g-nardiello opened this issue Jul 16, 2023 · 4 comments
Open

Admin ui not displays the map on the field #14

g-nardiello opened this issue Jul 16, 2023 · 4 comments

Comments

@g-nardiello
Copy link

Issue

I've installed the strapi-plugin-postgis on a clean version of strapi 4.11.5 instance.

I created a field "Posizione" on a collection, but when I create an item, only a black text area is available and not the interactive map to edit the field.

I'm expecting the map is available to edit the value of the field. How could I solve this?

Thank you!

Configurations

My schema.json contains the following:

    "Posizione": {
      "columnType": {
        "type": "specificType",
        "args": [
          "geometry(POINT,4326)"
        ]
      },
      "type": "customField",
      "customField": "plugin::postgis.map",
      "pluginOptions": {
        "i18n": {
          "localized": false
        }
      }
    }

My `middlewares.ts' is the following

export default [
  'strapi::errors',
  {
    name: 'strapi::security',
    config: {
      contentSecurityPolicy: {
        useDefaults: true,
        directives: {
          'img-src': ["'self'", 'data:', 'blob:', '*.tile.openstreetmap.org'],
          upgradeInsecureRequests: null,
        },
      },
    },
  },
  'strapi::cors',
  'strapi::poweredBy',
  'strapi::logger',
  'strapi::query',
  'strapi::body',
  'strapi::session',
  'strapi::favicon',
  'strapi::public',
];
@f3rland
Copy link

f3rland commented Sep 29, 2023

Same problem here

@max-degterev
Copy link

Did anyone figure out a fix for this yet?

@am2222
Copy link
Owner

am2222 commented Jan 29, 2024

Hi,
I think this is an issue with the newer versions and their support of the custom fields.

Is it possible to send me some more information about the errors you get?

@max-degterev
Copy link

My issue was looking at an outdated documentation, works now!

"location": {
      "columnType": {
        "type": "specificType",
        "args": [
          "geometry(POLYGON,4326)"
        ]
      },
      "type": "customField",
      "customField": "plugin::postgis.map"
    },
    
    ```
    
    this works with strapi@4.19.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants