Skip to content

Commit 71c71bd

Browse files
committed
Add support for point features
1 parent 921a4e0 commit 71c71bd

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

widgets/Report.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,11 @@ define([
179179
if (this.reportLayout.map) {
180180
if (this.feature && this.feature.geometry && this.feature.geometry.getExtent) {
181181
this.mapExtent = this.map.extent;
182-
this.map.setExtent(this.feature.geometry.getExtent(), true).then(lang.hitch(this, 'printMap'));
182+
if (this.feature.geometry.type === 'point') {
183+
this.map.centerAndZoom(this.feature.geometry, this.map.getMaxZoom() - 5).then(lang.hitch(this, 'printMap'));
184+
} else {
185+
this.map.setExtent(this.feature.geometry.getExtent(), true).then(lang.hitch(this, 'printMap'));
186+
}
183187
} else {
184188
this.mapExtent = null;
185189
this.printMap();

0 commit comments

Comments
 (0)