@@ -212,8 +212,8 @@ export class GttClient {
212
212
this . layerArray . forEach ( ( l :Layer ) => {
213
213
if ( l . get ( "baseLayer" ) ) {
214
214
this . map . addLayer ( l )
215
- }
216
- }
215
+ }
216
+ }
217
217
)
218
218
219
219
var containsOverlay = false ;
@@ -222,8 +222,8 @@ export class GttClient {
222
222
if ( ! l . get ( "baseLayer" ) ) {
223
223
this . map . addLayer ( l )
224
224
containsOverlay = true
225
- }
226
- }
225
+ }
226
+ }
227
227
)
228
228
}
229
229
@@ -312,7 +312,7 @@ export class GttClient {
312
312
313
313
// Control button
314
314
const maximizeCtrl = new Button ( {
315
- html : '<i class="gtt-icon-maximize " ></i>' ,
315
+ html : '<i class="material-icons " >zoom_out_map </i>' ,
316
316
title : "Maximize" ,
317
317
handleClick : ( ) => {
318
318
this . zoomToExtent ( true ) ;
@@ -398,7 +398,7 @@ export class GttClient {
398
398
else {
399
399
this . map . addControl ( new LayerPopup ( ) )
400
400
}
401
-
401
+
402
402
403
403
// Because Redmine filter functions are applied later, the Window onload
404
404
// event provides a workaround to have filters loaded before executing
@@ -461,8 +461,21 @@ export class GttClient {
461
461
this . updateForm ( [ evt . feature ] , true )
462
462
} )
463
463
464
+ // Material design icon
465
+ let mdi = 'place'
466
+
467
+ switch ( type . toLowerCase ( ) ) {
468
+ case 'linestring' :
469
+ mdi = 'polyline'
470
+ break ;
471
+
472
+ case 'polygon' :
473
+ mdi = 'format_shapes'
474
+ break ;
475
+ }
476
+
464
477
const control = new Toggle ( {
465
- html : `<i class="gtt-icon- ${ type . toLowerCase ( ) } " ></i>` ,
478
+ html : `<i class="material-icons " >${ mdi } </i>` ,
466
479
title : type ,
467
480
interaction : draw ,
468
481
active : ( idx === 0 )
@@ -473,7 +486,7 @@ export class GttClient {
473
486
// Upload button
474
487
if ( this . contents . upload === "true" ) {
475
488
editbar . addControl ( new Button ( {
476
- html : '<i class="gtt-icon-book" > </i>' ,
489
+ html : '<i class="material-icons">file_upload </i>' ,
477
490
title : 'Upload GeoJSON' ,
478
491
handleClick : ( ) => {
479
492
const data = prompt ( "Please paste a GeoJSON geometry here" )
@@ -496,7 +509,7 @@ export class GttClient {
496
509
setPopover ( ) {
497
510
const popup = new Popup ( {
498
511
popupClass : 'default' ,
499
- closeBox : true ,
512
+ closeBox : false ,
500
513
onclose : ( ) => { } ,
501
514
positioning : 'auto' ,
502
515
anim : true
@@ -522,7 +535,7 @@ export class GttClient {
522
535
const url = popup_contents . href . replace ( / \[ ( .+ ?) \] / g, feature . get ( 'id' ) )
523
536
content . push ( `<a href="${ url } ">Edit</a>` )
524
537
525
- popup . show ( feature . getGeometry ( ) . getFirstCoordinate ( ) , content . join ( ' ' ) )
538
+ popup . show ( feature . getGeometry ( ) . getFirstCoordinate ( ) , content . join ( '' ) as any )
526
539
} )
527
540
528
541
select . getFeatures ( ) . on ( [ 'remove' ] , _ => {
@@ -682,7 +695,7 @@ export class GttClient {
682
695
}
683
696
684
697
getSymbol ( feature : Feature < Geometry > ) {
685
- let symbol = 'mcr-icon-write '
698
+ let symbol = 'home '
686
699
687
700
const plugin_settings = JSON . parse ( this . defaults . pluginSettings )
688
701
const issue_tracker = document . querySelector ( '#issue_tracker_id' ) as HTMLInputElement
@@ -905,13 +918,13 @@ export class GttClient {
905
918
this . geolocations . push ( geolocation )
906
919
907
920
geolocation . on ( 'change' , ( evt ) => {
908
- console . log ( {
909
- accuracy : geolocation . getAccuracy ( ) ,
910
- altitude : geolocation . getAltitude ( ) ,
911
- altitudeAccuracy : geolocation . getAltitudeAccuracy ( ) ,
912
- heading : geolocation . getHeading ( ) ,
913
- speed : geolocation . getSpeed ( )
914
- } )
921
+ // console.log({
922
+ // accuracy: geolocation.getAccuracy(),
923
+ // altitude: geolocation.getAltitude(),
924
+ // altitudeAccuracy: geolocation.getAltitudeAccuracy(),
925
+ // heading: geolocation.getHeading(),
926
+ // speed: geolocation.getSpeed()
927
+ // })
915
928
} )
916
929
geolocation . on ( 'error' , ( error ) => {
917
930
// TBD
@@ -957,7 +970,7 @@ export class GttClient {
957
970
958
971
// Control button
959
972
const geolocationCtrl = new Toggle ( {
960
- html : '<i class="gtt-icon-compass" > </i>' ,
973
+ html : '<i class="material-icons">my_location </i>' ,
961
974
title : "Geolocation" ,
962
975
active : false ,
963
976
onToggle : ( active : boolean ) => {
@@ -1146,7 +1159,7 @@ export class GttClient {
1146
1159
1147
1160
// Control button
1148
1161
const geocodingCtrl = new Toggle ( {
1149
- html : '<i class="gtt-icon-search" > </i>' ,
1162
+ html : '<i class="material-icons">manage_search </i>' ,
1150
1163
title : "Geocoding" ,
1151
1164
className : "ctl-geocoding" ,
1152
1165
onToggle : ( active : boolean ) => {
@@ -1232,7 +1245,7 @@ export class GttClient {
1232
1245
return feature . getGeometry ( ) . getType ( ) === "Point"
1233
1246
} )
1234
1247
if ( pointIndex >= 0 ) {
1235
- console . log ( "Reloading Features layer" )
1248
+ // console.log("Reloading Features layer")
1236
1249
layer . changed ( )
1237
1250
}
1238
1251
}
0 commit comments