全站通知:

用户:16083703/地图教程

来自原神WIKI_BWIKI_哔哩哔哩
跳到导航 跳到搜索

未编写完成

tools地图页面

从未安装过大地图

复制下列代码并更改地址 替换括号内容包括括号 在F12控制台运行即可快速打开链接到自己站点

let myWikiDomain = "(更改为自己站点地址 eg:ys)"
$(".mw-parser-output a").each(function (index,item) {
    let nowLink = $(this).text()
    nowLink = nowLink.replace("您的Wiki地址",myWikiDomain)
    $(this).attr("href",nowLink)
    $(this).text(nowLink)
})

替换链接中的“您的Wiki地址”后创建该页面并填入链接下方的文字
请通过 https://wiki.biligame.com/您的Wiki地址/特殊:标签 新增3个标签

名称 原因
autoedit 由程序自动生成的编辑行为
aboutmap 修改内容与大地图功能相关
apiedit 通过api进行的编辑操作

https://wiki.biligame.com/您的Wiki地址/MediaWiki:Gadgets-definition

* Map3[ResourceLoader|rights=edit]|leaflet.css|leaflet.js|leaflet.canvas-markers.js|leaflet.pm.css|leaflet.pm.min.js|proj4.js|proj4leaflet.min.js|Md5.min.js|Map3.js
https://wiki.biligame.com/ys/MediaWiki:Gadget-leaflet.css https://wiki.biligame.com/您的Wiki地址/MediaWiki:Gadget-leaflet.css
https://wiki.biligame.com/ys/MediaWiki:Gadget-leaflet.pm.css https://wiki.biligame.com/您的Wiki地址/MediaWiki:Gadget-leaflet.pm.css
https://wiki.biligame.com/ys/MediaWiki:Gadget-proj4.js https://wiki.biligame.com/您的Wiki地址/MediaWiki:Gadget-proj4.js
https://wiki.biligame.com/ys/MediaWiki:Gadget-proj4leaflet.min.js https://wiki.biligame.com/您的Wiki地址/MediaWiki:Gadget-proj4leaflet.min.js
https://wiki.biligame.com/ys/MediaWiki:Gadget-Md5.min.js https://wiki.biligame.com/您的Wiki地址/MediaWiki:Gadget-Md5.min.js
https://wiki.biligame.com/ys/MediaWiki:Gadget-Map3.js https://wiki.biligame.com/您的Wiki地址/MediaWiki:Gadget-Map3.js
https://wiki.biligame.com/ys/MediaWiki:Gadget-leaflet.js https://wiki.biligame.com/您的Wiki地址/MediaWiki:Gadget-leaflet.js
https://wiki.biligame.com/ys/MediaWiki:Gadget-leaflet.canvas-markers.js https://wiki.biligame.com/您的Wiki地址/MediaWiki:Gadget-leaflet.canvas-markers.js
https://wiki.biligame.com/ys/MediaWiki:Gadget-leaflet.pm.min.js https://wiki.biligame.com/您的Wiki地址/MediaWiki:Gadget-leaflet.pm.min.js
https://wiki.biligame.com/ys/MediaWiki:Gadget-Map3 https://wiki.biligame.com/您的Wiki地址/MediaWiki:Gadget-Map3
https://wiki.biligame.com/您的Wiki地址/MediaWiki:Tag-autoedit-description
由程序自动生成的编辑行为
https://wiki.biligame.com/您的Wiki地址/MediaWiki:Tag-aboutmap-description
修改内容与大地图功能相关
https://wiki.biligame.com/您的Wiki地址/MediaWiki:Tag-apiedit-description
通过api进行的编辑操作

有安装过地图

复制左侧widget内容并粘贴到右侧自己站点

https://wiki.biligame.com/ys/widget:Map3/css https://wiki.biligame.com/您的Wiki地址/widget:Map3/css
https://wiki.biligame.com/ys/widget:Map3/icon https://wiki.biligame.com/您的Wiki地址/widget:Map3/icon
https://wiki.biligame.com/ys/widget:Datatext https://wiki.biligame.com/您的Wiki地址/widget:Datatext
https://wiki.biligame.com/ys/widget:Datatables https://wiki.biligame.com/您的Wiki地址/widget:Datatables
https://wiki.biligame.com/ys/模板:PointGrid https://wiki.biligame.com/您的Wiki地址/模板:PointGrid
https://wiki.biligame.com/ys/模块:Point https://wiki.biligame.com/您的Wiki地址/模块:Point
https://wiki.biligame.com/ys/MediaWiki:Gadget-Map3 https://wiki.biligame.com/您的Wiki地址/MediaWiki:Gadget-Map3
https://wiki.biligame.com/ys/widget:Map3/mapc https://wiki.biligame.com/您的Wiki地址/widget:Map3/mapc
普通地图
https://wiki.biligame.com/ys/widget:Map3/main https://wiki.biligame.com/您的Wiki地址/widget:Map3/main
普通地图
https://wiki.biligame.com/ys/widget:Map3.1/mapc https://wiki.biligame.com/您的Wiki地址/widget:Map3.1/mapc
如果需要分层地图则选择此项,不用复制普通地图
https://wiki.biligame.com/ys/widget:Map3.1/main https://wiki.biligame.com/您的Wiki地址/widget:Map3.1/main
如果需要分层地图则选择此项,不用复制普通地图

然后在大地图页面复制一下代码

<div id="mapData" style="display:none;">
	<div id="categoryData">{{:Data:Map/type/json}}</div>
	<div id="markerWithInfo">{{#ask:[[~Data:Map3/point/*]][[!~*/json]]|link=none|limit=1000}}</div>
	<div id="mapAreaData">
		[]
	</div>
</div>
{{#widget:Map3/css}}
{{#widget:Map3/icon}}
{{#widget:Map3/mapc}}
{{#widget:Map3/main}}

数据页面

点位列表数据

https://wiki.biligame.com/您的Wiki地址/Data:Map/type/json

[
{"type":"地标", "markType":201,"length":"{{#invoke:point|getLength|Map|201}}", "markTypeName":"七天神像", "defaultShow":"","class":"", "collectible":"", "geojson":"", "icon":"{{filepath:mapicon-地标.png}}", "desc":""},
{"type":"点位名称", "markType":点位id,"length":"{{#invoke:point|getLength|Map|点位id}}", "markTypeName":"种类", "defaultShow":"", "class":"", "collectible":"", "geojson":"", "icon":"{{filepath:点位名称.png}}", "desc":""}
]

点位数据

https://wiki.biligame.com/您的Wiki地址/Data:Map/point.json

<div id="mapPointData" style="display:none">{ {{#arraymap: {{#ask:[[分类:地图点位数据]][[~Data:Map/*]]|link=none|limit=1000}} | , | @ | {{#replace: @ | Data:Map/type/ | }}:{{:@/json}} | ,}} }</div>