@@ -354,7 +354,7 @@ function init() {
354
354
}
355
355
} ) ;
356
356
if ( mdLayer ) {
357
- mdLayer = capabilities . capability . layers [ 0 ] ;
357
+ console . log ( mdLayer ) ;
358
358
legendArgs = {
359
359
"service" : "WMS" ,
360
360
"version" : capabilities . version ,
@@ -369,40 +369,47 @@ function init() {
369
369
370
370
// attribution
371
371
if ( mdLayer . attribution ) {
372
- html = html +
373
- " (<a target='_blank'class='mdAttrib' href='" +
374
- mdLayer . attribution . href +
375
- "'>" +
376
- escHTML ( mdLayer . attribution . title ) +
377
- "</a>)" ;
372
+ if ( mdLayer . attribution . logo ) {
373
+ html += " (<a target='_blank'class='mdAttrib' href='" ;
374
+ html += mdLayer . attribution . href ;
375
+ html += "'>" ;
376
+ html += "<img class='mdLogo'src='" ;
377
+ html += mdLayer . attribution . logo . href ;
378
+ html += "'< /></a>)" ;
379
+ }
380
+ else {
381
+ html += " (<a target='_blank'class='mdAttrib' href='" ;
382
+ html += mdLayer . attribution . href ;
383
+ html += "'>" ;
384
+ html += escHTML ( mdLayer . attribution . title ) ;
385
+ html += "</a>)" ;
386
+ }
378
387
} ;
379
- html = html + "</h3>" ;
388
+ html += "</h3>" ;
380
389
381
390
// abstract
382
- html = html +
383
- "<p class='mdAbstract'>" +
384
- escHTML ( mdLayer . abstract ) ;
391
+ html += "<p class='mdAbstract'>" ;
392
+ html += escHTML ( mdLayer . abstract ) ;
385
393
386
394
// metadata
387
395
if ( mdLayer . metadataURLs ) {
388
396
$ . each ( mdLayer . metadataURLs , function ( i , md ) {
389
397
if ( md . format === "text/html" ) {
390
- html = html +
391
- " <a target='_blank'class='mdMeta' href='" +
392
- md . href +
393
- "'>" +
394
- "[+]</a>" ;
398
+ html += " <a target='_blank'class='mdMeta' href='" ;
399
+ html += md . href ;
400
+ html += "'>" ;
401
+ html += "[+]</a>" ;
395
402
} ;
396
403
} ) ;
397
404
} ;
398
- html = html + "</p>" ;
405
+ html += "</p>" ;
399
406
400
407
// legend
401
- html = html + "<img class='mdLegend' src='" +
402
- Ol . Util . urlAppend ( capabilities . service . href , Ol . Util . getParameterString ( legendArgs ) ) +
403
- "' />" ;
408
+ html += "<img class='mdLegend' src='" ;
409
+ html += Ol . Util . urlAppend ( capabilities . service . href , Ol . Util . getParameterString ( legendArgs ) ) ;
410
+ html += "' />" ;
404
411
405
- html = html + "<hr />" ;
412
+ html += "<hr />" ;
406
413
407
414
$ ( "#legend" ) . append ( html ) ;
408
415
}
@@ -734,7 +741,6 @@ function init() {
734
741
} ;
735
742
} ) ;
736
743
$ ( "#georchestraFormData" ) . val ( JSON . stringify ( params ) ) ;
737
- console . log ( params ) ;
738
744
return true ;
739
745
}
740
746
} ;
0 commit comments