Skip to content

Commit

Permalink
re-fix-map-redraw
Browse files Browse the repository at this point in the history
  • Loading branch information
srbgs committed Mar 20, 2024
1 parent d892d98 commit d3ea3f6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 23 deletions.
27 changes: 4 additions & 23 deletions app/static/js/htmlView.js
Original file line number Diff line number Diff line change
Expand Up @@ -330,29 +330,10 @@ agsHtml.setupCollapsibles=function(){
};

// interfaces to vMap (validation-map.js)
agsHtml.setupValidationMap=function(){
console.log("agsHtml.setupValidationMap");
vMap.setupValidationMap();
return true;
};

agsHtml.showOnValidationMap=function(geoJSON,fileName,ix){
console.log("agsHtml.showOnValidationMap " + ix);
vMap.showOnValidationMap(geoJSON,fileName,ix);
return true;
};

agsHtml.resetValidationMap=function(){
console.log("agsHtml.resetValidationMap");
vMap.resetValidationMap();
return true;
};

agsHtml.hideValidationMap=function(){
console.log("agsHtml.hideValidationMap");
vMap.hideValidationMap();
return true;
};
agsHtml.setupValidationMap=function(){ vMap.setupValidationMap(); return true; };
agsHtml.showOnValidationMap=function(geoJSON,fileName,ix){ vMap.showOnValidationMap(geoJSON,fileName,ix); return true; };
agsHtml.resetValidationMap=function(){ vMap.resetValidationMap(); return true; };
agsHtml.hideValidationMap=function(){ vMap.hideValidationMap(); return true; };

// init
agsHtml.init=function(){
Expand Down
2 changes: 2 additions & 0 deletions app/static/js/validation-map.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ vMap.showOnValidationMap=function(geoJSON,fileName,ix){

vMap.fitValidationMap=function(){
console.log("vMap.fitValidationMap");
// force map redraw
vMap.map.lMap.invalidateSize();
// fit bounds of validation GeoJSON layer(s)
vMap.map.lMap.fitBounds(vMap.map.lyrs.GeoJSON.getBounds());
return true;
Expand Down

0 comments on commit d3ea3f6

Please sign in to comment.