Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions geonode_mapstore_client/client/js/epics/gnresource.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ import {
getCataloguePath,
isDefaultDatasetSubtype,
resourceHasPermission,
checkIfGeometryAttributeIsNull,
canEditMap
} from '@js/utils/ResourceUtils';
import {
Expand Down Expand Up @@ -183,7 +182,7 @@ const resourceTypes = {
const [mapConfig, gnLayer, newLayer] = response;
const {minx, miny, maxx, maxy } = newLayer?.bbox?.bounds || {};
const extent = newLayer?.bbox?.bounds && [minx, miny, maxx, maxy ];
const hasNoGeometry = checkIfGeometryAttributeIsNull(gnLayer.attribute_set);
const hasNoGeometry = gnLayer?.subtype === 'tabular';
const hasDownloadPermission = gnLayer?.perms?.includes('download_resourcebase');
return Observable.of(
configureMap({
Expand Down
6 changes: 1 addition & 5 deletions geonode_mapstore_client/client/js/utils/ResourceUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ import { excludeGoogleBackground, extractTileMatrixFromSources, ServerTypes } fr
import { getGeoNodeLocalConfig, parseDevHostname } from '@js/utils/APIUtils';
import { ProcessTypes, ProcessStatus } from '@js/utils/ResourceServiceUtils';
import { determineResourceType } from '@js/utils/FileUtils';
import { isGeometryType } from '@mapstore/framework/utils/ogc/WFS/base';

import { createDefaultStyle } from '@mapstore/framework/utils/StyleUtils';

/**
* @module utils/ResourceUtils
*/
Expand Down Expand Up @@ -996,10 +996,6 @@ export const canAccessPermissions = (resource) => {
return perms?.includes('change_resourcebase_permissions');
};

export const checkIfGeometryAttributeIsNull = (attributeSet) => {
return isEmpty(attributeSet?.find(attribute => isGeometryType({ type: attribute.attribute_type })));
};

/**
* Check if the resource can be edited (for map resources)
* @param {Object} gnresource - The state of the resource
Expand Down
Loading