File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -95,17 +95,20 @@ function loadExampleHtml() {
9595 if ( ! mapUrl ) {
9696 return ;
9797 }
98+ var isError = false ;
9899 var html = $ . ajax ( {
99100 url : mapUrl ,
100101 async : false ,
101102 error : function ( error ) {
102103 alert ( resources . editor . envTips ) ;
103- html = "" ;
104+ isError = true ;
104105 }
105106 } ) . responseText ;
106- if ( html && html != "" ) {
107+ if ( html && html != "" && ! isError ) {
107108 $ ( '#editor' ) . val ( html ) ;
108109 loadPreview ( html ) ;
110+ } else {
111+ window . location . href = window . location . origin + '/web/404.html' ;
109112 }
110113}
111114
Original file line number Diff line number Diff line change 6363 map . addControl ( new maplibregl . NavigationControl ( ) , 'top-left' ) ;
6464
6565 maplibregl . supermap . SecurityManager . registerToken ( urlDataFlow , window . exampleToken ) ;
66- var popup = new maplibregl . Popup ( ) ;
66+ var popup = new maplibregl . Popup ( {
67+ focusAfterOpen : false
68+ } ) ;
6769
6870 map . on ( 'load' , function ( ) {
6971 var options = {
You can’t perform that action at this time.
0 commit comments