ããã¯FOSS4G AdventCalendar 2024 (シリーズ2)ã®10æ¥ç®ã®è¨äºã§ãã
ç§ããã£ããããããã§ããããã¡ãã®è¨äºã«ãã³ããå¾ã¦ãããããã§ãç«¥å¿ã«è¿ããå°å³ãä½æãã¦ã¿ã¾ããð
qiita.com
å®æã¤ã¡ã¼ã¸
https://tmizu23.github.io/advent2024/santa.html#15.66/35.691993/138.486518/-11.4/79
ææ
ä½ãæ¹
â noto-emojiããã¦ã³ãã¼ããã¾ãã
noto-emojiã®ãµã¤ãããä¸å¼ãã¦ã³ãã¼ããã¾ããsvgãã©ã«ããã使ç¨ããç»åãé¸å¥ãã¦ããããããããã¡ã¤ã«åã«å¤æ´ãã¦ããã¾ãããã
â¡ spreetãå©ç¨ãã¦svgããã¹ãã©ã¤ããä½æãã¾ãã
ã¹ãã©ã¤ãã¨ã¯å°å³ä¸ã§ä½¿ç¨ããã¢ã¤ã³ã³ãä¸ã¤ã®ç»åã«ã¾ã¨ãããã®ã§ããsvgããã¹ãã©ã¤ããä½æããããã«spreetãå©ç¨ãã¾ããspreetãã¤ã³ã¹ãã¼ã«ãã¦ã以ä¸ã®ã³ãã³ããæã¤ã¨ãsvgãã©ã«ãã«å ¥ã£ã¦ããç»åããmy_symbol.pngã¨my_symbol.jsonãä½æããã¾ããpngã¯ç»åãã¾ã¨ãããã®ãjsonã¯åç»åã®ä½ç½®ã¨ååãè¨é²ããã¦ãã¾ããé«è§£å度ç¨ã®ãã¡ã¤ã«ã--retinaã®ãªãã·ã§ã³ãã¤ãã¦ä½æãã¾ãã
spreet svg my_symbol spreet --retina svg my_symbol@2x
ä½æãããã¡ã¤ã«ä¸å¼ã¯spriteãã©ã«ãã«å ¥ãã¦èªåã®ã¦ã§ããµã¤ãã«ã¢ãããã¼ããã¦ããã¾ãã
⢠å°çé¢ãã¯ãã«ã¿ã¤ã«ã®ã¹ã¿ã¤ã«ãç¨æãã¾ãã
å°çé¢å°å³ã®æ¨æºã®ã¹ã¿ã¤ã«(std.json)ã以ä¸ã«ããã®ã§åã£ã¦ãã¾ãã
github.com
⣠std.jsonã®"sprite"ãå¤æ´ãã¾ãã
èªåãä½æããã¹ãã©ã¤ããèªã¿è¾¼ããããã«std.jsonã®"sprite"ã®è¡ã以ä¸ã®ããã«å¤æ´ãã¾ããidã¯ãå ã®ãã®ã"default"ã«ãã¦ãèªåã§ä½æãããã®ãä»åã¯"custom"ã«ãã¦ããã¾ããurlã¯spriteãã©ã«ããã¢ãããã¼ãããå ´æã«ã¹ãã©ã¤ãã®ãã¡ã¤ã«å(æ¡å¼µåãé¤ã)ãå ãããã®ã«ãªãã¾ãã
"sprite": [{ id: "default", url: "https://gsi-cyberjapan.github.io/optimal_bvmap/sprite/std" }, { id: "custom", url: "https://tmizu23.github.io/advent2024/sprite/my_symbol" }],
â»ãã®æ¹æ³ã¯maplibreでの仕様ã§ãã
⤠å°å³è¨å·ãç½®ãæãã¾ãã
æ¢åã®å°å³è¨å·ãèªåã§ä½æããã¹ãã©ã¤ãã®ã¢ã¤ã³ã³ã«ç½®ãæãã¾ããã¢ããã³ãã«ã¬ã³ãã¼ãªã®ã§ã¯ãªã¹ãã¹é¢¨ã«ãã¾ãã
ä¸è§ç¹ããã«ã«ãé»ååºæºç¹ãã±ã¼ãã«ãæ°´æºç¹ã¯ãã¬ã¼ã³ãã«ãããã¦è人ãã¼ã ã¯ãµã³ã¿ããã«ãçºé»æçã¯ããã«ã¤ã«ãã¾ãããã¾ããå¦æ ¡ã¯åã©ããã¡ã«ã寺é¢ã¯éªã ãã¾ã«ãæ樹åã¯ã¯ãªã¹ãã¹ã½ã³ã°ã®é³ç¬¦ã«ãåè·¡ãæ´é¢¨ã®ãã£ãã¹ã«ã«ãªã£ã¦ã¾ããã¤ãã§ã«ã風è»ãé³¥ãã³ã¦ã¢ãªãè¡çªããªãããã«ãããã®ã¼ãã«ãã¦ããã¾ããã
ã¾ãã§ã·ã³ãã¬ã©ã®éæ³ä½¿ãã®æ°åã§ãããããã¯ããã売ãã®ãã£ãããææã®ç¯ç«ã§è¦ã¦ããå¹»æ³ã§ãã
ãã®ã»ãã®å°å³è¨å·ãããªãã¹ãå
ã®æå³ãæãªããªãããã«ç½®ãæãã¾ããï¼ãã£ãããããã®ããªãå ´åã¯ãè«ãåç©ã«ãªã£ã¦ã¾ãï¼
ãããªæãã§ãã
- ä¸è§ç¹ â ãã«
- é»ååºæºç¹ â ã±ã¼ã
- æ°´æºç¹ â ãã¬ã¼ã³ã
- è人ãã¼ã â ãµã³ã¿
- çºé»æç â ããã«ã¤
- æ¨é«ç¹ï¼æ¸¬ç¹ï¼ â ã¹ã¿ã¼
- ç° â ãã
- å¯ºé¢ â éªã ãã¾
- ç¥ç¤¾ â ç¥ç¤¾
- æ¸©æ³ â 温æ³
- å¢å° â ãã°ã
- æ樹å â ããã·
- åè·¡ â ãã£ãã¹ã«
- é¢¨è» â ããã®ã¼ã
- å°å¦æ ¡ â å°å¦ç
- é«çå¦æ ¡ã»ä¸çæè²å¦æ ¡ â é«æ ¡ç
- è¦å¯ç½² â è¦å¯å®
- æ¶é²ç½² â æ¶é²å£«
- 主è¦ãªæ¸¯ â ãã§ãªã¼
- 港湾 â é£è¹
- æ¼æ¸¯ â ãããª
- 主è¦ãªç©ºæ¸¯ â é£è¡æ©
- çºæå½¹å ´ã»æ¿ä»¤æå®é½å¸ã®åºå½¹æ â 建ç©
- å¤å½å ¬é¤¨ â 風è¹
- ç¯å° â æ³¢
- ç â ãã¥ã¼ãªãã
- è¶ç â èã£ã±
- åºè樹æ â åºè樹
- éè樹æ â éè樹
- 竹æ â ä¸å¤
- èå° â ãµã«
- æ²¹äºã»ã¬ã¹äº â ã¢ãª
- é»æ³¢å¡ â ã«ã¢
- å´ç«å£ã»å´æ°å£ â ã¯ã·
- åç©é¤¨æ³ã®ç»é²åç©é¤¨ã»åç©é¤¨ç¸å½æ½è¨ â ãã³
⥠ãã¯ãã«ã¿ã¤ã«ã®ã¹ã¿ã¤ã«std.jsonã®ã¢ã¤ã³ã³åãå¤æ´ãã¾ãã
ä¸è¨ã®ã¨ããã«ã¢ã¤ã³ã³ã®ãã¡ã¤ã«åãç½®æããã°è¯ãã®ã§ããããã®éã«â£ã§æå®ããid(ä»åã¯custom)ãã³ãã³:ã§ãã£ã¤ãã¾ããdefaultã®ã¢ã¤ã³ã³ã¯ããã®ã¾ã¾ã§OKã§ãã
⥠maplibreã§ã¹ã¿ã¤ã«ãèªã¿è¾¼ã¿ã¾ãã
ãã¨ã¯ãmaplibreã§ã¹ã¿ã¤ã«ãèªã¿è¾¼ãã§å°å³ãä»ä¸ãã¾ããã¬ã¤ã¤ã¼ãã³ã³ãã¼ãã¼ã«ãä»ã足ãã¦å®æã§ããã³ã¼ãä¸å¼ã¯ãã¡ãã«ããã¾ããGitHub - tmizu23/advent2024
ã§ãããã
https://tmizu23.github.io/advent2024/santa.html#15.66/35.691993/138.486518/-11.4/79
https://tmizu23.github.io/advent2024/santa.html#14.13/33.42358/132.18962/31.2/45
https://tmizu23.github.io/advent2024/santa.html#14.89/35.65808/139.70288/0/48
ã³ãã»ãã¤ã³ã
ã好ã¿ã§ã¢ã¤ã³ã³ãç¹æ» ããããã¨ãã§ãã¾ãã
ã¾ãç¹æ» ããããã¢ã¤ã³ã³ã®ã¬ã¤ã¤ã¼ãã¹ã¿ã¤ã«ã«è¿½å ãã¾ãã
{ "id": "ã¹ã¿ã¼ã¬ã¤ã¤", "type": "symbol", "source": "v", "source-layer": "Anno", "filter": ["==", ["get", "vt_code"], 7102], // ä¸è§ç¹ã«è©²å½ãããã£ã«ã¿ "layout": { "icon-allow-overlap": true, "icon-image": "custom:ã¹ã¿ã¼", // åæã¢ã¤ã³ã³ãè¨å® "icon-size": 0.3, } }
次ã«ä»¥ä¸ã®ã³ã¼ãã§ã¢ã¤ã³ã³ãåãæ¿ãããã¨ã§ç¹æ» ããã¾ããintervalãå¤ããã°ç¹æ» ã¹ãã¼ããå¤æ´ã§ãã¾ãã
map.on('load', () => { const frames = ["custom:ã¹ã¿ã¼", ""]; const interval = 1000; let frameIndex = 0; setInterval(() => { const currentFrame = frames[frameIndex]; frameIndex = (frameIndex + 1) % frames.length; map.setLayoutProperty("ã¹ã¿ã¼ã¬ã¤ã¤", "icon-image", currentFrame); }, interval); });
ææ³
åè«ååã§å°å³è¨å·ãå¤ãã¦ã¿ã¾ãããã外国人にわかりやすい地図作成の取り組み | 国土地理院ãã¨ããå ¬å¼ã®ãã®ãããã¾ããå°å³è¨å·ãç¨éã«ãã£ã¦å¤æ´ããã¨è¦ãæ¹ãéã£ã¦é¢ç½ãã§ããããã¯ãã«ã¿ã¤ã«ãªããããç°¡åã«ã§ãã¾ãããã§ã¯ãè¯ãã¯ãªã¹ãã¹ãï¼