File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -289,6 +289,17 @@ class Position {
289289 let target = document . getElementById ( "landmarkLocation" ) ;
290290 target . dataset . coordinates = "[" + coordinates . lon + "," + coordinates . lat + "]" ;
291291 target . value = this . name ;
292+ if ( type !== "myposition" && this . #getTrueHeader( ) !== "Repère placé" ) {
293+ let landmarkTitle = document . getElementById ( "landmark-title" ) ;
294+ landmarkTitle . value = this . #getTrueHeader( ) . split ( "\n" ) [ 0 ] ;
295+ if ( this . additionalHtml . beforeButtons ) {
296+ let landmarkDesc = document . getElementById ( "landmark-description" ) ;
297+ let tempDomElem = domUtils . stringToHTML ( this . additionalHtml . beforeButtons ) ;
298+ document . body . appendChild ( tempDomElem ) ;
299+ landmarkDesc . value = tempDomElem . innerText ;
300+ document . body . removeChild ( tempDomElem ) ;
301+ }
302+ }
292303 }
293304 } ) ;
294305 }
@@ -423,7 +434,7 @@ class Position {
423434 */
424435 async compute ( options = { } ) {
425436 const lngLat = options . lngLat || false ;
426- const text = options . text || "Repère placé" ;
437+ const text = options . text || "Repère placé" ;
427438 let html = options . html || "" ;
428439 const html2 = options . html2 || "" ;
429440 const hideCallback = options . hideCallback || null ;
You can’t perform that action at this time.
0 commit comments