Skip to content

Commit 6e89734

Browse files
committed
rename type to "coordinates". suppress fields/types.
1 parent bba40ee commit 6e89734

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/minicharts/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ module.exports = AmpersandView.extend(QueryBuilderMixin, {
8282
// we have a GeoJSON document: {type: "Point", coordinates: [lng, lat]}
8383
this.model.values = coords;
8484
this.model.fields.reset();
85+
this.model.name = 'Coordinates';
8586
return true;
8687
} else if (this.model.name === 'Array') {
8788
var lengths = this.model.lengths;
@@ -91,6 +92,8 @@ module.exports = AmpersandView.extend(QueryBuilderMixin, {
9192
if (!coords) return false;
9293
// we have a legacy coordinate pair: [lng, lat]
9394
this.model.values = coords;
95+
this.model.types.reset();
96+
this.model.name = 'Coordinates';
9497
return true;
9598
}
9699
return false;

src/minicharts/querybuilder.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ module.exports = {
8080
break;
8181
case 'Array':
8282
case 'Document':
83+
case 'Coordinates':
8384
if (data.source === 'geo') {
8485
queryType = 'geo';
8586
} else {

0 commit comments

Comments
 (0)