File tree 9 files changed +34
-29
lines changed
controllers/au/org/ala/spatial/portal
9 files changed +34
-29
lines changed Original file line number Diff line number Diff line change 484
484
if ( data [ pt ] instanceof Array ) {
485
485
g = [ data [ pt ] [ 1 ] , data [ pt ] [ 2 ] ] ;
486
486
} else {
487
- g = data [ pt ] . geometry . replace ( "POINT(" , "" ) . replace ( ")" , "" ) . split ( " " ) ;
487
+ g = data [ pt ] . geometry . replace ( "POINT (" , "" ) . replace ( ")" , "" ) . split ( " " ) ;
488
488
}
489
489
var m = L . marker ( [ g [ 1 ] , g [ 0 ] ] )
490
490
. bindLabel ( data [ pt ] . name , { noHide : true } ) ;
772
772
} , 0 )
773
773
774
774
} ] )
775
- } ( angular ) ) ;
775
+ } ( angular ) ) ;
Original file line number Diff line number Diff line change 301
301
var currentLayer = scope . selected . layer ;
302
302
var selectedStyle = currentLayer . style
303
303
304
- if ( currentLayer . metadataUrl != undefined ) {
305
- //Raster style
306
- if ( selectedStyle == 'non-linear' ) selectedStyle = currentLayer . defaultStyle //e.g geomacs_gmean
307
- if ( selectedStyle == 'linear' ) selectedStyle = currentLayer . defaultStyle + '_linear'
308
- //Vector sytle
309
- if ( selectedStyle == 'default' ) selectedStyle = currentLayer . defaultStyle //e.g cl1084
310
- if ( selectedStyle == 'outline' ) selectedStyle = 'outline'
311
- if ( selectedStyle == 'filled' ) selectedStyle = 'polygon'
312
- currentLayer . leaflet . layerOptions . layers [ 0 ] . layerParams . styles = selectedStyle
313
- currentLayer . leaflet . layerOptions . layers [ 0 ] . legendurl = currentLayer . leaflet . layerOptions . layers [ 0 ] . legendurl . replace ( / & s t y l e = [ ^ & ] * / , "&style=" + encodeURIComponent ( selectedStyle ) ) ;
314
- }
304
+ //Raster style
305
+ if ( selectedStyle == 'non-linear' ) selectedStyle = currentLayer . defaultStyle //e.g geomacs_gmean
306
+ if ( selectedStyle == 'linear' ) selectedStyle = currentLayer . defaultStyle + '_linear'
307
+ //Vector sytle
308
+ if ( selectedStyle == 'default' ) selectedStyle = currentLayer . defaultStyle //e.g cl1084
309
+ if ( selectedStyle == 'outline' ) selectedStyle = 'outline'
310
+ if ( selectedStyle == 'filled' ) selectedStyle = 'polygon'
311
+ currentLayer . leaflet . layerOptions . layers [ 0 ] . layerParams . styles = selectedStyle
312
+ currentLayer . leaflet . layerOptions . layers [ 0 ] . legendurl = currentLayer . leaflet . layerOptions . layers [ 0 ] . legendurl . replace ( / & s t y l e = [ ^ & ] * / , "&style=" + encodeURIComponent ( selectedStyle ) ) ;
315
313
316
314
$timeout ( function ( ) {
317
315
MapService . reloadLayer ( currentLayer )
Original file line number Diff line number Diff line change 21
21
return {
22
22
getPhotos : function ( bbox ) {
23
23
var url = $SH . flickrUrl + $SH . flickrSearchPhotos
24
- + '&api_key=' + $SH . flickrApiKey + '&extras=' + encodeURIComponent ( $SH . flickrExtra )
25
- + '&tags=' + encodeURIComponent ( $SH . flickrTags )
26
- + '&geo_context=' + encodeURIComponent ( $SH . flickrGeoContext )
27
- + '&content_type=' + encodeURIComponent ( $SH . flickrContentType )
28
- + $SH . flickrFilter
24
+ + '&api_key=' + $SH . flickrApiKey
29
25
+ '&per_page=' + $SH . flickrNbrOfPhotosToDisplay
30
- + '&format=json&nojsoncallback=1&bbox=' ;
26
+ + '&format=json&nojsoncallback=1&bbox=' + bbox ;
27
+ if ( $SH . flickrExtra != '' ) url += '&extras=' + encodeURIComponent ( $SH . flickrExtra )
28
+ if ( $SH . flickrTags != '' ) url += '&tags=' + encodeURIComponent ( $SH . flickrTags )
29
+ if ( $SH . flickrGeoContext != '' ) url += '&geo_context=' + encodeURIComponent ( $SH . flickrGeoContext )
30
+ if ( $SH . flickrContentType != '' ) url += '&content_type=' + encodeURIComponent ( $SH . flickrContentType )
31
+ if ( $SH . flickrFilter != '' ) url += $SH . flickrFilter
31
32
32
- return $http . get ( url + bbox , _httpDescription ( 'getPhotos' ) ) . then ( function ( response ) {
33
+ return $http . get ( url , _httpDescription ( 'getPhotos' ) ) . then ( function ( response ) {
33
34
return response . data ;
34
35
} ) ;
35
36
} ,
Original file line number Diff line number Diff line change 731
731
var url = layer . layer . displaypath
732
732
url = url . replace ( / \? .* / , '' )
733
733
734
+ var source = 'analysis'
734
735
if ( layer . id . startsWith ( "el" ) || id . layertype == 'gridAsContextual' ) {
736
+ source = 'environmental'
735
737
id . defaultStyle = layer . layer . name
736
738
} else if ( layer . id . startsWith ( "cl" ) ) {
739
+ source = 'contextual'
737
740
id . defaultStyle = layer . id
738
741
}
739
742
751
754
opacity : id . opacity / 100.0 ,
752
755
url : url ,
753
756
layertype : id . layertype ,
757
+ source : source ,
754
758
layerParams : {
755
759
opacity : id . opacity / 100.0 ,
756
760
layers : 'ALA:' + layer . layer . name ,
757
761
format : 'image/png' ,
758
- transparent : true ,
759
- styles : style || id . id
762
+ transparent : true
760
763
}
761
764
} ;
765
+ if ( source != 'analysis' && ! style ) {
766
+ newLayer . layerParams . styles = style || id . id
767
+ }
762
768
763
769
if ( id . layertype === 'scatterplotEnvelope' ) {
764
770
var layer2 = LayersService . getLayer ( id . layer2 ) ;
Original file line number Diff line number Diff line change 73
73
74
74
//include redirect to biocache-service/occurrences/search page
75
75
var sampleUrl = _this . species . ws + '/download/options1?searchParams=' +
76
- encodeURIComponent ( 'q=' + query . qid ) +
76
+ encodeURIComponent ( '? q=' + encodeURIComponent ( query . qid ) ) +
77
77
"&targetUri=/occurrences/search%3F&downloadType=records" ;
78
78
79
79
if ( _this . layers && ( _this . layers . length > 0 ) ) {
Original file line number Diff line number Diff line change 312
312
</ div >
313
313
314
314
< div class ="form-group row "
315
- ng-show ="selected.layer.layertype == 'grid' && selected.layer.metadataUrl == undefined ">
315
+ ng-show ="selected.layer.layertype == 'grid' && selected.layer.id.startsWith('el') ">
316
316
< label i18n ="529 " style =";width:70px "> Style</ label >
317
317
< select style =";width:300px " id ='gridStyle ' ng-model ="selected.layer.style "
318
318
ng-change ="updateStyle() " testTag ="layerStyleInLegend ">
Original file line number Diff line number Diff line change @@ -647,8 +647,8 @@ environments:
647
647
grails :
648
648
serverURL : " http://local.ala.org.au:8087"
649
649
layersService :
650
- # url: "http://localhost:8081/ws"
651
- url : " https://spatial.ala.org.au/ws"
650
+ url : " http://localhost:8081/ws"
651
+ # url: "https://spatial.ala.org.au/ws"
652
652
geoserver :
653
653
url : ' http://localhost:8079/geoserver'
654
654
test :
Original file line number Diff line number Diff line change 12
12
</encoder >
13
13
</appender >
14
14
15
- <logger name =" org.hibernate.orm.deprecation" level =" OFF " />
16
- <logger name =" org.grails.config.NavigableMap" level =" OFF " />
15
+ <logger name =" org.hibernate.orm.deprecation" level =" ERROR " />
16
+ <logger name =" org.grails.config.NavigableMap" level =" ERROR " />
17
17
18
18
<root level =" info" >
19
19
<appender-ref ref =" STDOUT" />
Original file line number Diff line number Diff line change @@ -291,7 +291,7 @@ class PortalController {
291
291
} else {
292
292
def type = id
293
293
MultipartFile mFile = ((MultipartHttpServletRequest ) request). getFile(' shapeFile' )
294
- def settings = [api_key : grailsApplication. config. api_key]
294
+ def settings = [apiKey : grailsApplication. config. api_key]
295
295
296
296
String ce = grailsApplication. config. character. encoding
297
297
You can’t perform that action at this time.
0 commit comments