File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed
src/service/PlotBase/SymbolManager Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -19,12 +19,20 @@ export default class SymbolManager {
1919 this . _symbols = null ;
2020 this . _symbolsUrl = "" ;
2121
22- const { fontURL = '' } = options ;
23- if ( fontURL ) {
22+ const { fontURL = '' , baseUrl = '' } = options ;
23+
24+ if ( ! window . _mapgisSymanagerConfig_ ) {
2425 window . _mapgisSymanagerConfig_ = { } ;
26+ }
27+
28+ if ( fontURL ) {
2529 window . _mapgisSymanagerConfig_ . _fontURL = fontURL ;
2630 }
2731
32+ if ( baseUrl ) {
33+ window . _mapgisSymanagerConfig_ . _baseUrl = baseUrl ;
34+ }
35+
2836 if ( ! SymbolManager . instance ) {
2937 this . _symbolsUrl = symbolsUrl ;
3038 SymbolManager . instance = this ;
Original file line number Diff line number Diff line change @@ -89,7 +89,10 @@ export default class SymbolNode extends SymbolBase {
8989 * 获取符号对应svg
9090 */
9191 async getSvg ( ) {
92- const url = this . src ;
92+ let url = this . src ;
93+ if ( window . _mapgisSymanagerConfig_ && window . _mapgisSymanagerConfig_ . _baseUrl ) {
94+ url = window . _mapgisSymanagerConfig_ . _baseUrl + url ;
95+ }
9396 const res = await axios ( {
9497 method : 'get' ,
9598 url : url ,
You can’t perform that action at this time.
0 commit comments