@@ -16,7 +16,7 @@ interface Props {
1616const  BUILTIN_TEMPLATES  =  { 
1717  openstreetmap : { 
1818    name : "OpenStreetMap" , 
19-     url : "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png " , 
19+     url : "" , 
2020    wiki : "https://wiki.openstreetmap.org/wiki/Tiles" , 
2121    requiresToken : false , 
2222  } , 
@@ -65,12 +65,10 @@ const MapTileLayerProviderSelect = (props: Props) => {
6565  } ; 
6666
6767  const  handleCustomUrlSubmit  =  ( )  =>  { 
68-     if  ( customUrl . trim ( ) )  { 
69-       onValueChange ( customUrl . trim ( ) ) ; 
70-       setIsCustomDialogOpen ( false ) ; 
71-       setCustomUrl ( "" ) ; 
72-       setSelectedTemplate ( "" ) ; 
73-     } 
68+     onValueChange ( customUrl . trim ( ) ) ; 
69+     setIsCustomDialogOpen ( false ) ; 
70+     setCustomUrl ( "" ) ; 
71+     setSelectedTemplate ( "" ) ; 
7472  } ; 
7573
7674  const  handleTemplateSelect  =  ( templateKey : string )  =>  { 
@@ -166,7 +164,7 @@ const MapTileLayerProviderSelect = (props: Props) => {
166164              < Label  htmlFor = "custom-url" > { t ( "setting.preference-section.map-config.tile-server-url" ) } </ Label > 
167165              < Textarea 
168166                id = "custom-url" 
169-                 placeholder = "https://your-tileserver.com /{z}/{x}/{y}.png" 
167+                 placeholder = "https://{s}.tile.openstreetmap.org /{z}/{x}/{y}.png" 
170168                value = { customUrl } 
171169                onChange = { handleUrlChange } 
172170                className = "mt-2 min-h-[40px] resize-none" 
@@ -204,9 +202,7 @@ const MapTileLayerProviderSelect = (props: Props) => {
204202            < Button  variant = "outline"  onClick = { ( )  =>  setIsCustomDialogOpen ( false ) } > 
205203              { t ( "common.cancel" ) } 
206204            </ Button > 
207-             < Button  onClick = { handleCustomUrlSubmit }  disabled = { ! customUrl . trim ( ) } > 
208-               { t ( "setting.preference-section.map-config.apply" ) } 
209-             </ Button > 
205+             < Button  onClick = { handleCustomUrlSubmit } > { t ( "setting.preference-section.map-config.apply" ) } </ Button > 
210206          </ DialogFooter > 
211207        </ DialogContent > 
212208      </ Dialog > 
0 commit comments