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() {
95
95
if ( ! mapUrl ) {
96
96
return ;
97
97
}
98
+ var isError = false ;
98
99
var html = $ . ajax ( {
99
100
url : mapUrl ,
100
101
async : false ,
101
102
error : function ( error ) {
102
103
alert ( resources . editor . envTips ) ;
103
- html = "" ;
104
+ isError = true ;
104
105
}
105
106
} ) . responseText ;
106
- if ( html && html != "" ) {
107
+ if ( html && html != "" && ! isError ) {
107
108
$ ( '#editor' ) . val ( html ) ;
108
109
loadPreview ( html ) ;
110
+ } else {
111
+ window . location . href = window . location . origin + '/web/404.html' ;
109
112
}
110
113
}
111
114
Original file line number Diff line number Diff line change 63
63
map . addControl ( new maplibregl . NavigationControl ( ) , 'top-left' ) ;
64
64
65
65
maplibregl . supermap . SecurityManager . registerToken ( urlDataFlow , window . exampleToken ) ;
66
- var popup = new maplibregl . Popup ( ) ;
66
+ var popup = new maplibregl . Popup ( {
67
+ focusAfterOpen : false
68
+ } ) ;
67
69
68
70
map . on ( 'load' , function ( ) {
69
71
var options = {
You can’t perform that action at this time.
0 commit comments