2006Scape Wiki:Map: Difference between revisions

Jump to navigation Jump to search
scape_>Ralpha
No edit summary
scape_>Ralpha
Line 228: Line 228:
     { // draw a marker
     { // draw a marker
       "type": "Feature",
       "type": "Feature",
       "properties": {
       "properties": { // This point uses the icons in the providers, for icons not in providers look at the next items
         "providerID": 1, // Id of icon provider see: datasources.id
         "providerID": 1, // Id of icon provider see: datasources.id
         "icon": "general_store", // name as defined in datasources.dataproviders.iconlist
         "icon": "general_store", // name as defined in datasources.dataproviders.iconlist
        // if both (providerID and icon) properties are not given, or image not found, it will fall back to a grey marker
         "mapID": 0, // mapID of when to display icon can be number (0) of array of numbers ([0,1]) to display on multiple maps
         "mapID": 0, // mapID of when to display icon can be number (0) of array of numbers ([0,1]) to display on multiple maps
         "zoom": [0, 5] // optional, only display this feature between zoom levels, [minZoom, maxZoom]
         "zoom": [0, 5] // optional, only display this feature between zoom levels, [minZoom, maxZoom]
Line 245: Line 246:
     { // other points
     { // other points
       "type": "Feature",
       "type": "Feature",
       "properties": {
       "properties": { // This point uses an image from the wiki as its icon
         "providerID": 1,
         "iconWikiLink": "File:Egg.png", // Link to image, not this value is case sensitive
         "icon": "helmet_shop",
         "iconSize": [15,20], // The size of the icon on the map [width,height], if image is a different size is will be scaled
        // if both (iconWikiLink and iconSize) properties are not given it will fall back to a grey marker
         "mapID": [0,1]
         "mapID": [0,1]
       },
       },
Line 278: Line 280:
     // for more features look in GeoJSON standard, other features include: Polygon, MultiPoint, MultiLineString and MultiPolygon
     // for more features look in GeoJSON standard, other features include: Polygon, MultiPoint, MultiLineString and MultiPolygon
   ]
   ]
}
</syntaxhighlight>
The main config file look like this:
<syntaxhighlight lang="json">
{
  "basePathURL": "https://chisel.weirdgloop.org/", // path prefix for pathfinding. Path suffix example: "/pathfinder/path.json?..."
  "baseTileURL": "https://osrsmap.ralphbisschops.com/", // path prefix (appended by tileURLFormat) for downloading base maps
  "tileURLFormat": "maps/{mapID}/{z}/{p}_{x}_{-y}.png", // format for how the tiles are stored
  "attribution": "<a href=\"https://weirdgloop.org/licensing/\" target=\"_blank\">License</a>", // attribution field on map
  "dataloaderFile": "data/dataloader.json", // path to the main dataloader file
  "wikiImageURL": "https://oldschool.runescape.wiki/images/" // path prefix for image used on overlayMaps. Path suffix example: "/4/41/Old_School_RuneScape_logo.png"
}
}
</syntaxhighlight>
</syntaxhighlight>
Anonymous user

Navigation menu