File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -193,6 +193,9 @@ var App = (function ($, publ) {
193
193
194
194
// Add LayerSwitcher Image Toolbar
195
195
map . addControl ( new ol . control . LayerPopup ( ) ) ;
196
+
197
+ // Add map events
198
+ map . on ( 'moveend' , publ . updateFilter ) ;
196
199
} ;
197
200
198
201
/**
@@ -343,6 +346,16 @@ var App = (function ($, publ) {
343
346
}
344
347
} ;
345
348
349
+ /**
350
+ * Updates map settings for Redmine filter
351
+ */
352
+ publ . updateFilter = function ( ) {
353
+ var center = map . getView ( ) . getCenter ( ) ;
354
+ var extent = map . getView ( ) . calculateExtent ( map . getSize ( ) ) ;
355
+ console . log ( "Map Center (WGS84): " , ol . proj . transform ( center , 'EPSG:3857' , 'EPSG:4326' ) ) ;
356
+ console . log ( "Map Extent (WGS84): " , ol . proj . transformExtent ( extent , 'EPSG:3857' , 'EPSG:4326' ) ) ;
357
+ }
358
+
346
359
/**
347
360
* Parse page for WKT strings in history
348
361
*/
You can’t perform that action at this time.
0 commit comments