am2222 / strapi-plugin-postgis

Add native postgis support to strapi.
https://am2222.github.io/strapi-plugin-postgis/
40 stars 14 forks source link

Admin ui not displays the map on the field #14

Open g-nardiello opened 1 year ago

g-nardiello commented 1 year ago

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 commented 9 months ago

Same problem here

max-degterev commented 5 months ago

Did anyone figure out a fix for this yet?

am2222 commented 5 months ago

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 commented 5 months ago

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