@@ -59,7 +59,7 @@ import {FLATMAP_LEGEND} from './legend'
5959import type { FlatmapLegendEntry } from './legend'
6060import { UserInteractions } from './interactions'
6161import { MapTermGraph } from './knowledge'
62- import { KNOWLEDGE_SOURCE_SCHEMA , FlatMapServer } from './mapserver'
62+ import { KNOWLEDGE_SOURCE_SCHEMA , type FlatMapServer , SERVER_FLATMAP_RESOURCE } from './mapserver'
6363import { loadMarkerIcons } from './markers'
6464import { APINATOMY_PATH_PREFIX , type PathType } from './pathways'
6565import { SearchIndex } from './search'
@@ -258,7 +258,7 @@ export class FlatMap
258258 this . #mapServer = mapServer
259259 this . #baseUrl = mapServer . url ( )
260260 this . #id = mapDescription . id
261- this . #url = `${ this . #baseUrl} flatmap/ ${ mapDescription . uuid } `
261+ this . #url = `${ this . #baseUrl} ${ SERVER_FLATMAP_RESOURCE } ${ mapDescription . uuid } `
262262 this . #uuid = mapDescription . uuid
263263 this . #details = mapDescription . details
264264 this . #mapMetadata = mapDescription . mapMetadata
@@ -760,8 +760,8 @@ export class FlatMap
760760 }
761761 }
762762
763- makeServerUrl ( url , resource = 'flatmap/' ) : string
764- //==============================================
763+ makeServerUrl ( url , resource = SERVER_FLATMAP_RESOURCE ) : string
764+ //==========================================================
765765 {
766766 if ( url . startsWith ( 'http://' ) || url . startsWith ( 'https://' ) ) {
767767 return url
@@ -849,11 +849,7 @@ export class FlatMap
849849 get url ( )
850850 //========
851851 {
852- const url = this . makeServerUrl ( '' )
853- if ( url . endsWith ( '/' ) ) {
854- return url . substring ( 0 , url . length - 1 )
855- }
856- return url
852+ return this . #url
857853 }
858854
859855 /**
0 commit comments