Skip to content

Commit

Permalink
#97 default overview map to 0,0 when feature has no geometry
Browse files Browse the repository at this point in the history
  • Loading branch information
cosbyr committed Nov 1, 2018
1 parent aac02da commit 607f6f9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions js/app/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -531,8 +531,14 @@ define(['lib/i18n.min!nls/resources.js', 'prepareAppConfigInfo', 'handleUserSign
if (prepareAppConfigInfo.appParams.includeOverviewMap) {
// Jump the overview map to candidate.obj.geometry after transforming to lat/long;
// we've asked the server to give us the geometry in lat/long (outSR=4326) for Leaflet
main.overviewMap.setView([candidate.obj.geometry.y, candidate.obj.geometry.x],
prepareAppConfigInfo.appParams.overviewMapZoom);
if (candidate.obj.hasOwnProperty('geometry')){
main.overviewMap.setView([candidate.obj.geometry.y, candidate.obj.geometry.x],
prepareAppConfigInfo.appParams.overviewMapZoom);
}
else{
main.overviewMap.setView([0, 0],
prepareAppConfigInfo.appParams.overviewMapZoom);
}
}

// Gallery
Expand Down
2 changes: 1 addition & 1 deletion js/app/survey.js
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ define([], function () {
},

/**
* Creates a survey form in the specified element.
* Checks to see that button, list, and dropdown questio styles have a domain set
* @param {object} questionInfo Survey question, which contains question, field, style, domain, important
*/
_checkDomain: function(questionInfo){
Expand Down

0 comments on commit 607f6f9

Please sign in to comment.