File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
src/internal-packages/schema/lib/component Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ const PropTypes = require('prop-types');
33const Type = require ( './type' ) ;
44const Minichart = require ( './minichart' ) ;
55const detectCoordinates = require ( 'detect-coordinates' ) ;
6+ const app = require ( 'hadron-app' ) ;
67const _ = require ( 'lodash' ) ;
78
89// const debug = require('debug')('mongodb-compass:schema:field');
@@ -101,11 +102,13 @@ class Field extends React.Component {
101102 * @return {Object } The possibly modified type
102103 */
103104 getSemanticType ( type ) {
104- // check if the type represents geo coordinates
105- const coords = detectCoordinates ( type ) ;
106- if ( coords ) {
107- type . name = 'Coordinates' ;
108- type . values = coords ;
105+ // check if the type represents geo coordinates, if privacy settings allow
106+ if ( app . isFeatureEnabled ( 'enableMaps' ) ) {
107+ const coords = detectCoordinates ( type ) ;
108+ if ( coords ) {
109+ type . name = 'Coordinates' ;
110+ type . values = coords ;
111+ }
109112 }
110113 return type ;
111114 }
You can’t perform that action at this time.
0 commit comments