Web Mapã¯å±¥æŽããŒã¿ãäžè¬çãªRDFããŒã¿ãœãŒã¹ãšããŠä¿æããŠããŸããæ§é ãææ¡ããŠããã°ãèªäœã®ã¢ããªã±ãŒã·ã§ã³ãæ¡åŒµããå©çšããããšãã§ããŸãã
ãŸããå±¥æŽããŒã¿ãååŸã»èç©ããåŠçã®éšåïŒããã¯ãšã³ãïŒãšãŠãŒã¶ãŒã€ã³ã¿ãŒãã§ãŒã¹ã§ããããã衚瀺éšåïŒããã³ããšã³ãïŒã¯åå²ããŠéçºããŠããŸãã®ã§ãWeb Mapã®å±¥æŽããŒã¿ãèµ°æ»ããããã®ãµãŒãã¹ãšããŠãããã¯ãšã³ãéšåã®ã¿ãå©çšããããšãå¯èœã§ãã
Web Mapã¯ãããŒãžã®URLãã¿ã€ãã«ãæçµèšªåæå»ãªã©ã®æ å ±ãããã¡ã€ã³ããšã«å¥ã ã®ãã¡ã€ã«ã§ç®¡çããŠããŸãïŒé ãèšå®ãå€æŽããããšã§ãåäžã®ãã¡ã€ã«ã«ãŸãšããããšãã§ããŸãïŒã
ããŒã¿ãã©ã«ãïŒããã©ã«ãã§ã¯ãŠãŒã¶ãŒãããã¡ã€ã«å ã®ãwebmapããã©ã«ãïŒå ã«ãããŠããã¡ã€ã«ã¯ä»¥äžã®ããã«é 眮ãããŸãã
Web Mapã¯ããŒãéã®ãªã³ã¯æ å ±ã蟿ã£ãŠå±¥æŽããŒã¿å šäœã«ã¢ã¯ã»ã¹ããŸããããã®åºçºç¹ãšãªãããŒãïŒããã¯ããŒã¯ããéãããããURIãçŽæ¥å ¥åããŠéããããããããªã³ã¯å ãç¡ãããŒãïŒã«ã€ããŠãç¹å¥ã«æ å ±ãä¿æããŠããŸããããŒã¿ãã©ã«ãçŽäžã«ãã webmap.rdf ãããã§ãã
ãã®ããŒã¿ãœãŒã¹ã¯ãURIã https://piro.sakura.ne.jp/rdf/webmap#urn:webmap:root ã®ã·ãŒã±ã³ã·ã£ã«ãªã³ã³ãããäžã€ã ãå«ãã§ããŸãããã®ã³ã³ããã«ã¯ https://piro.sakura.ne.jp/ ãªã©ã®URIã®ãªãœãŒã¹ãèŠçŽ ãšããŠæ ŒçŽãããŸãã
<?xml version="1.0"?>
<RDF:RDF xmlns:NC="http://home.netscape.com/NC-rdf#"
xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<RDF:Seq RDF:about="https://piro.sakura.ne.jp/rdf/webmap#urn:webmap:root">
<RDF:li RDF:resource="https://piro.sakura.ne.jp/"/>
<RDF:li RDF:resource="http://www.osakac.ac.jp/"/>
<RDF:li RDF:resource="http://www.google.co.jp/"/>
</RDF:Seq>
<RDF:Description RDF:about="https://piro.sakura.ne.jp/rdf/webmap#urn:webmap:root"
WMNS:EntriesCount="22">
<WMNS:FirstEntry RDF:resource="https://piro.sakura.ne.jp/xul/xul.html"/>
<WMNS:LastEntry RDF:resource="https://piro.sakura.ne.jp/latest/"/>
</RDF:Description>
</RDF:RDF>
ãŸããåãURIã®ãªãœãŒã¹ã«ããå±¥æŽãšããŠããã€ãã®æ å ±ãä¿æããŠããŸãã
https://piro.sakura.ne.jp/rdf/webmap#EntriesCount ã«ã¯ããªãã©ã«ãšããŠããŒãã®ç·æ°ãä¿æããŠããŸãã https://piro.sakura.ne.jp/rdf/webmap#FirstEntry ã«ã¯å±¥æŽãšããŠèŠãæã®ãæåã®/æãå€ã/蚪ååæ°ã®æãå°ãªããããŒããã https://piro.sakura.ne.jp/rdf/webmap#LastEntry ãæåŸã®/æãæ°ãã/蚪ååæ°ã®æãå€ããããŒãããªãœãŒã¹ãšããŠé¢é£ä»ããããŠããŸãã
ãªããé ãèšå®ã§å šãŠã®ããŒã¿ãäžã€ã®ããŒã¿ãœãŒã¹ã«ä¿åããããã«èšå®ããŠããå Žåã¯ã以äžã®èšè¿°ããããŒã¿ã®å šãŠãããã®ããŒã¿ãœãŒã¹ã«ä¿åãããŸãã
åãã¡ã€ã³çšã®ããŒã¿ãœãŒã¹ã¯ãããã¡ã€ã³ã«å«ãŸããããŒãã®ãªã¹ãããåããŒãã®æ å ±ãããã®ãã¡ã€ã³ã®ããŒããå§ç¹ãšããã¢ãŒã¯ã®æ å ±ããå«ãã§ããŸãã以äžã¯å¡äŸã§ãã
<?xml version="1.0"?>
<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:NC="http://home.netscape.com/NC-rdf#"
xmlns:NCWB="http://home.netscape.com/WEB-rdf#"
xmlns:WMNS="https://piro.sakura.ne.jp/rdf/webmap#">
<RDF:Seq RDF:about="https://piro.sakura.ne.jp/rdf/webmap#urn:webmap:nodes:
[ãã¡ã€ã³åãURIãšã³ã³ãŒãããæåå]">
<RDF:li>
<RDF:Description RDF:about="[URI]"
NC:URL="[URI]"
NC:Name="[ã¿ã€ãã«]"
NCWB:LastVisitDate="[æçµèšªåæå»]"
NCWB:LastModifiedDate="[æçµæŽæ°æå»]"
WMNS:VisitedCount="[蚪ååæ°]">
<NC:Icon>
<RDF:Description RDF:about="[faviconã®URI]">
<WMNS:ImageData RDF:resource="[ãã£ãã·ã¥ãã¡ã€ã«ã®URL]"/>
<WMNS:Page RDF:resource="[ãã®faviconãåç
§ããŠããããŒãžã®URI]"/>
...
</RDF:Description>
</NC:Icon>
...
<WMNS:AvailableIcon RDF:about="[å®éã«å©çšå¯èœãªfaviconã®URI]" />
<WMNS:Thumbnail RDF:about="[ãµã ãã€ã«ã®ãã¡ã€ã«ã®URI]" />
<WMNS:OlderEntry RDF:about="[åã®ãšã³ããªã®URI]" />
<WMNS:LaterEntry RDF:about="[次ã®ãšã³ããªã®URI]" />
<WMNS:Arcs>
<RDF:Seq RDF:about="https://piro.sakura.ne.jp/rdf/webmap#urn:webmap:arcs:
[ãã®ããŒãžã®URIãURIãšã³ã³ãŒãããæåå]">
<RDF:li>
<RDF:Description RDF:about="https://piro.sakura.ne.jp/rdf/webmap#urn:webmap:arc:
[é·ç§»å
ã®URIãURIãšã³ã³ãŒãããæåå]:
[é·ç§»å
ã®URIãURIãšã³ã³ãŒãããæåå]"
NCWB:ForeignDomain="[å¥ãã¡ã€ã³ãžã®ã¢ãŒã¯ãåŠã]"
NCWB:LastVisitDate="[æçµèšªåæå»]"
WMNS:VisitedCount="[蚪ååæ°]">
<WMNS:ArcType RDF:resource="[ã¢ãŒã¯ã®çš®å¥]"/>
<WMNS:From RDF:resource="[é·ç§»å
URI]"/>
<WMNS:To RDF:resource="[é·ç§»å
URI]"/>
</RDF:Description>
</RDF:li>
...
</RDF:Seq>
</WMNS:Arcs>
</RDF:Description>
</RDF:li>
...
</RDF:Seq>
</RDF:RDF>
â»ããŒã¿ãœãŒã¹ã®èªã¿æžãã¯XPCOMã®æ©èœã䜿ã£ãŠè¡ã£ãŠããŸãã®ã§ãå®éã«ã¯ãã£ãšãšã£æ£ããã£ãŠããŸããããã§ã¯ã説æãç°¡åã«ããããã«å ¥ãåã䜿ã£ãŠè¡šçŸãçŽããŠããŸãã
å ·äœäŸãšããŠããã®ãµã€ãã®ãããããŒãžã®å ŽåãçšããŠè§£èª¬ããŸãã
<?xml version="1.0"?>
<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:NC="http://home.netscape.com/NC-rdf#"
xmlns:NCWB="http://home.netscape.com/WEB-rdf#"
xmlns:WMNS="https://piro.sakura.ne.jp/rdf/webmap#">
<RDF:Seq RDF:about="https://piro.sakura.ne.jp/rdf/webmap#urn:webmap:nodes:
piro.sakura.ne.jp">
<RDF:li>
<RDF:Description RDF:about="https://piro.sakura.ne.jp/"
NC:URL="https://piro.sakura.ne.jp/"
NC:Name="outsider reflex"
NCWB:LastVisitDate="1101020524125"
NCWB:LastModifiedDate="1101020523000"
WMNS:VisitedCount="2">
<NC:Icon>
<RDF:Description RDF:about="https://piro.sakura.ne.jp/common/favicon.png">
<WMNS:ImageData RDF:resource="file://..."/>
<WMNS:Page RDF:resource="https://piro.sakura.ne.jp/"/>
...
</RDF:Description>
</NC:Icon>
<NC:Icon>
<RDF:Description RDF:about="https://piro.sakura.ne.jp/common/favicon.ico"
WMNS:ImageData="data:">
<WMNS:Page RDF:resource="https://piro.sakura.ne.jp/"/>
...
</RDF:Description>
</NC:Icon>
<WMNS:AvailableIcon RDF:about="https://piro.sakura.ne.jp/common/favicon.png" />
<WMNS:Thumbnail RDF:about="file://.../piro.sakura.ne.jp/tn123456.jpg" />
<WMNS:OlderEntry RDF:about="https://piro.sakura.ne.jp/xul/xul.html" />
<WMNS:LaterEntry RDF:about="https://piro.sakura.ne.jp/latest/" />
<WMNS:Arcs>
<RDF:Seq RDF:about="https://piro.sakura.ne.jp/rdf/webmap#urn:webmap:arcs:
http%3A%2F%2Fpiro.sakura.ne.jp%2F">
<RDF:li>
<RDF:Description RDF:about="https://piro.sakura.ne.jp/rdf/webmap#urn:webmap:arc:
http%3A%2F%2Fpiro.sakura.ne.jp%2F:
http%3A%2F%2Fpiro.sakura.ne.jp%2Flatest%2F"
NCWB:ForeignDomain="false"
NCWB:LastVisitDate="1101020527843"
WMNS:VisitedCount="1">
<WMNS:ArcType RDF:resource="https://piro.sakura.ne.jp/rdf/webmap#Link"/>
<WMNS:From RDF:resource="https://piro.sakura.ne.jp/"/>
<WMNS:To RDF:resource="https://piro.sakura.ne.jp/latest/"/>
</RDF:Description>
</RDF:li>
...
</RDF:Seq>
</WMNS:Arcs>
</RDF:Description>
</RDF:li>
...
</RDF:Seq>
</RDF:RDF>
<RDF:Seq RDF:about="https://piro.sakura.ne.jp/rdf/webmap#urn:webmap:nodes:
piro.sakura.ne.jp">
...
</RDF:Seq>
ãã®ãã¡ã€ã³ã«å±ããå
šãŠã®ããŒãã¯ãã·ãŒã±ã³ã·ã£ã«ãªã³ã³ããã§ããã«ãŒãããŒãã«æ ŒçŽãããŠããŸããURIã®æ«å°Ÿã«ã¯ãã¡ã€ã³åãURIãšã³ã³ãŒãããæååãä»äžãããŸããïŒJavaScriptã§ããã°ãencodeURIComponent()
ã§å€æããæååã§ãïŒ
<RDF:li>
<RDF:Description RDF:about="https://piro.sakura.ne.jp/"
NC:URL="https://piro.sakura.ne.jp/" âURIæåå
NC:Name="outsider reflex" âããŒãžå
NCWB:LastVisitDate="1101020524125" âæçµèšªåæå»
NCWB:LastModifiedDate="1101020523000" âæçµæŽæ°æå»
WMNS:VisitedCount="2"> â蚪ååæ°
...
</RDF:Description>
</RDF:li>
æçµèšªåæå»ãšæçµæŽæ°æå»ã¯ã(new Date()).getTime()
ã§ååŸã§ãã圢åŒã®æŽæ°å€ã§ããæçµæŽæ°æå»ãååŸã§ããªãã£ãå Žåã¯0ã«ãªããŸãã蚪ååæ°ã¯1以äžã®æŽæ°å€ã§ãã
ããŒãžã®URIãæååãšããŠä¿æããŠããŸãããããã¯ãå©çšããŠãããªããŠãæ§ããŸããïŒå®éãWeb Mapã§ã¯å©çšããŠããŸããïŒããªããåæç¶æ ã§ã¯ããã®URIã¯ã?ã以äžãšã#ã以äžãåé€ãã圢ã§èšé²ãããŸãã
<NC:Icon>
<RDF:Description RDF:about="https://piro.sakura.ne.jp/common/favicon.png">
<WMNS:ImageData RDF:resource="file://..."/> âãã£ãã·ã¥ãã¡ã€ã«ã®URL
<WMNS:Page RDF:resource="https://piro.sakura.ne.jp/"/> âãã®faviconãåç
§ããŠããããŒãž
...
</RDF:Description>
</NC:Icon>
faviconã®æ å ±ã¯ http://home.netscape.com/NC-rdf#Icon ã®ãªãœãŒã¹ãšããŠä¿æããŠããŸããäžã€ã®ããŒãžã«è€æ°ã®faviconãèšå®ãããŠããå ŽåãããŒãã®æ å ±ã¯ãã®ãªãœãŒã¹ãè€æ°åæã€ããšã«ãªããŸãã
ãã£ãã·ã¥ãã¡ã€ã«ã¯ãªãœãŒã¹ãšããŠé¢é£ä»ããããŠããŸãããã ããfaviconãæ£åžžã«ååŸã§ããªãã£ãå ŽåãäŸãã°faviconã®ãã¡ã€ã«ã404 Not Foundã ã£ãå Žåãªã©ã¯ããªãœãŒã¹ã§ã¯ãªããªãã©ã«ãšã㊠data:
ãšããå€ãä¿æããŸãã
<NC:Icon>
<RDF:Description RDF:about="https://piro.sakura.ne.jp/common/favicon.ico"
WMNS:ImageData="data:">
...
</RDF:Description>
</NC:Icon>
ãªãããã®ä»æ§ãèŠããšåãããšãããfaviconã®ããŒã¿ã¯data:ã¹ããŒãã䜿ã£ãŠçŽæ¥RDFããŒã¿ãœãŒã¹å ã«ä¿æããããšãã§ããŸããWeb Mapã¯æšæºã§ã¯ååŸããfaviconããã¡ã€ã«ãã®ãŸãŸã®åœ¢ã§ãã£ãã·ã¥ããŸãããé ãèšå®ãå€æŽãããšãdata:ã¹ããŒãã䜿ã£ãŠãªãã©ã«ãšããŠä¿æããããã«ãªããŸãã
faviconã®æ å ±ã«ã¯ããã®faviconãåç §ããŠããå šãŠã®ããŒãžããªãœãŒã¹ãšããŠé¢é£ä»ããããŠããŸãã
<WMNS:AvailableIcon RDF:about="https://piro.sakura.ne.jp/common/favicon.png" />
ãã®ããŒãžãè€æ°åã®faviconãæã£ãŠããå Žåã«ãã©ã®faviconã衚瀺ãããã®æ å ±ã¯ã https://piro.sakura.ne.jp/rdf/webmap#AvailableIcon ãšããŠä¿æããŠããŸãã
<WMNS:Thumbnail RDF:about="file://.../piro.sakura.ne.jp/tn123456.jpg" />
ãµã ãã€ã«ã®æ å ±ã¯ https://piro.sakura.ne.jp/rdf/webmap#Thumbnail ã®ãªãœãŒã¹ãšããŠä¿æããŠããŸãããã¡ã€ã«åã¯æ¥é èŸãtnããšã©ã³ãã ãªæ°å€ãšã®çµã¿åããã§ããã¡ã€ã«åœ¢åŒã¯Mozillaã衚瀺å¯èœãªä»»æã®åœ¢åŒã§ãã
<WMNS:OlderEntry RDF:about="https://piro.sakura.ne.jp/xul/xul.html" />
<WMNS:LaterEntry RDF:about="https://piro.sakura.ne.jp/latest/" />
Web Mapã¯Webé²èŠ§ã®å±¥æŽã§ããããŸããåã ã®ããŒãã¯æç³»åé ã«äºãã蟿ããããã https://piro.sakura.ne.jp/rdf/webmap#OlderEntry ãšããŠãèªåã®åã®/èªåããå€ãããšã³ããªãã https://piro.sakura.ne.jp/rdf/webmap#LaterEntry ãèªåã®æ¬¡ã®/èªåããæ°ããããšã³ããªãããããããªãœãŒã¹ãšããŠä¿æããŠããŸãããããã蟿ãããšã«ãã£ãŠãåŠçç³»ã¯å±¥æŽããŒã¿ãæç³»åé ã«åŠçããããšãã§ããŸãã
ãªããå šãŠã®ããŒãã®äžã§ãæåã®ããŒããã§ããããŒãã¯ãOlderEntryãæã¡ãŸããããŸãããæåŸã®ããŒããã§ããããŒãã¯LaterEntryãæã¡ãŸããã
Web Mapã®å±¥æŽããŒã¿ã¯ãããŒãžå士ã®é¢ä¿ããåçŽãªããªã³ã¯å ãªãœãŒã¹ãããªã³ã¯å ãªãœãŒã¹ãžã®åç §ãã§ã¯ãªãããã¢ãŒã¯ããšããç¬ç«ãããªãœãŒã¹ã®æ å ±ãšããŠä¿æããŠããŸããããã«ãããããã蚪åãããªã³ã¯ã¯åŒ·èª¿ããŠè¡šç€ºããããªã©ã®å¿çšãå¯èœã«ãªããŸãã
<WMNS:Arcs>
<RDF:Seq RDF:about="https://piro.sakura.ne.jp/rdf/webmap#urn:webmap:arcs:
http%3A%2F%2Fpiro.sakura.ne.jp%2F">
...
</RDF:Seq>
</WMNS:Arcs>
ãã®ããŒãžã«é¢é£ä»ããããå šãŠã®ã¢ãŒã¯ã®æ å ±ã¯ã https://piro.sakura.ne.jp/rdf/webmap#Arc ã®ã·ãŒã±ã³ã·ã£ã«ãªã³ã³ããã«ä¿æããŠããŸããã³ã³ããã®URIã®æ«å°Ÿã«ã¯ããã®ããŒãžã®URIãURIãšã³ã³ãŒãããæååãä»äžãããŸãã
<RDF:li>
<RDF:Description RDF:about="https://piro.sakura.ne.jp/rdf/webmap#urn:webmap:arc:
http%3A%2F%2Fpiro.sakura.ne.jp%2F:
http%3A%2F%2Fpiro.sakura.ne.jp%2Flatest%2F"
NCWB:ForeignDomain="false" âå¥ãã¡ã€ã³ãžã®ã¢ãŒã¯ãã©ãã
NCWB:LastVisitDate="1101020527843" âã¢ãŒã¯ã®æçµèšªåæå»
WMNS:VisitedCount="1"> âã¢ãŒã¯ã®èšªååæ°
<WMNS:ArcType RDF:resource="https://piro.sakura.ne.jp/rdf/webmap#Link"/> âã¢ãŒã¯ã®çš®å¥
<WMNS:From RDF:resource="https://piro.sakura.ne.jp/"/> âé·ç§»å
URI
<WMNS:To RDF:resource="https://piro.sakura.ne.jp/latest/"/> âé·ç§»å
URI
</RDF:Description>
</RDF:li>
åã ã®ã¢ãŒã¯ã¯ãURIã®æ«å°Ÿã« é·ç§»å URIãURIãšã³ã³ãŒãããæåå:é·ç§»å URIãURIãšã³ã³ãŒãããæåå ãšãã圢åŒã®æååãä»äžãããŸããäºã€ã®URIã®ãšã³ã³ãŒãåŸã®æååãã:ãã«ãã£ãŠé£çµãããŠããããšã«æ³šæããŠãã ããããªãããã®æååããã®ã¢ãŒã¯ã®IDåãšãªããŸãã
ã¢ãŒã¯ã¯ããããŒãžäžã®ãªã³ã¯ã以å€ã«ãæ§ã ãªã±ãŒã¹ã§äœããåŸãŸããäŸãã°ãå èªã¿ã§ãã£ãããã¡ã¿ããŒã¿ãšããŠé¢é£ä»ããããŠãããããã®ãããªãã¢ãŒã¯ã®çš®é¡ãã¯ã https://piro.sakura.ne.jp/rdf/webmap#ArcType ã§ãªãœãŒã¹ãšããŠä¿æããŠããŸããçŸåšã®æã¯ã以äžã®å€ãæå¹ã§ãã
ã¢ãŒã¯ã¯é·ç§»å
ãšé·ç§»å
ã®URIããªãœãŒã¹ãšããŠä¿æããŠããŸããé·ç§»å
ãšé·ç§»å
ã®ãã¡ã€ã³ãç°ãªããã©ããã®æ
å ±ã¯ãããããã®URIãæ¯èŒããã°ãã¡ããåãããŸãããåŸã
ã®å©çšã®ããã«ã https://piro.sakura.ne.jp/rdf/webmap#ForeignDomain ã«true
ãfalse
ã®ãªãã©ã«ã§æ
å ±ãä¿æããŠããŸãã
ããŒã¿ãœãŒã¹ããã¡ã€ã³ããšã«åå²ããèšå®ã®å Žåãåè¿°ã®ãåã ã®ã¢ãŒã¯ã®æ å ±ãã¯ãé·ç§»å URIã®ãã¡ã€ã³çšã®ããŒã¿ãœãŒã¹ã®ã¿ã«ä¿æãããŸãã
äŸãã° http://www.google.co.jp/ ãã https://piro.sakura.ne.jp/ ãžã®ãªã³ã¯ã®ã¢ãŒã¯æ å ±ã§ããã°ãpiro.sakura.ne.jp ã®ããŒã¿ãœãŒã¹ã«å«ãŸããããã®ããŒãã®ã¢ãŒã¯äžèŠ§ãã«ã¯ãåçŽã«ããã®ããŒãã«ã¯URIã ...urn:webmap:arc:http%3A%2F%www.google.co.jp%2F:http%3A%2F%2Fpiro.sakura.ne.jp%2F ã®ãªãœãŒã¹ãã¢ãŒã¯ãšããŠé¢é£ä»ããããŠããããšããæ å ±ã ããèšé²ãããŸãã
ãã ããäŸå€çã«ãhttps://piro.sakura.ne.jp/rdf/webmap#ForeignDomain ã®æ å ±ã ãã¯äž¡æ¹ã®ããŒã¿ãœãŒã¹ã«èšé²ãããŸããããã¯ããã€ãã®å±é¢ã§åŠçãåçŽåããããã®æªçœ®ã§ãã
Web Mapã®ããã¯ãšã³ã㯠chrome://webmap/content/webmapService.js å
ã§å®çŸ©ãããŠãããµãŒãã¹ãšããŠã®ãªããžã§ã¯ã WebMapService
ã«ãããŠå®è£
ãããŠããŸãããã®ãªããžã§ã¯ãã®ã¡ãœããã䜿çšããã°ãåè¿°ã®ãããªãããããããŒã¿ãå²ãšç°¡åã«åŠçããããšãã§ããŸãã
ããŒãã®æ
å ±ã¯ã WebMapService.updateNode()
ã§æŽæ°ã§ããŸããããŒã¿ãœãŒã¹ã®ãã¡ã€ã«ã®çæãã¢ãŒã¯ã®æŽæ°ãªã©ãé©åãªã¡ãã»ãŒãžãäžããããšã§å
šãŠèªåã§åŠçããŠãããŸãã
ãã®ã¡ãœããã¯ã¡ãã»ãŒãžçšã®ãªããžã§ã¯ãäžã€ã ããåŒæ°ãšããŠåããŸãã
var message = {
URI : 'https://piro.sakura.ne.jp/',
linkedURI : 'https://piro.sakura.ne.jp/latest/',
title : 'outsider reflex',
isActive : true,
incrementCount : true
};
WebMapService.updateNode(message);
ã¡ãã»ãŒãžãªããžã§ã¯ãã«ã¯ä»¥äžã®ããããã£ãèšå®ã§ããŸãã
ã¢ãŒã¯ã®æ
å ±ã®ã¿ãæŽæ°ããå Žåã WebMapService.updateArc()
ã䜿ããŸãã
ãã®ã¡ãœããã¯ã¡ãã»ãŒãžçšã®ãªããžã§ã¯ãäžã€ã ããåŒæ°ãšããŠåããŸãã
var message = {
fromURI : 'https://piro.sakura.ne.jp/latest/',
targetURI : 'https://piro.sakura.ne.jp/',
isLink : true,
incrementCount : true
};
WebMapService.updateArc(message);
ã¡ãã»ãŒãžãªããžã§ã¯ãã«ã¯ä»¥äžã®ããããã£ãèšå®ã§ããŸãã
çŸæç¹ã§ã¯ãisLinkãfalseã®å Žåã¯äœãããŸããããŸããé·ç§»å ãšé·ç§»å ã®ã©ã¡ããã空ã®å ŽåããäœãããŸããã
ããŒãã®æ
å ±ãåé€ããå Žåã WebMapService.removeNode()
ã䜿ããŸãã
ãã®ã¡ãœããã¯ãåé€å¯Ÿè±¡ã®ããŒãã®URIãããŒãã®RDFãªãœãŒã¹ïŒnsIRDFResourceïŒãã¡ãã»ãŒãžçšã®ãªããžã§ã¯ãã®ããããããåŒæ°ãšããŠåããŸããèšãæããã°ãã©ããæž¡ããŠãã¡ãããšããŒãæ å ±ãåé€ããŸãããŸããããŒããåé€ãããšãé£åããŠãã®ããŒãã«é¢é£ä»ããããŠããå šãŠã®ã¢ãŒã¯ãåé€ãããŸãã
WebMapService.removeNode('https://piro.sakura.ne.jp/');
ã¡ãã»ãŒãžãªããžã§ã¯ãã䜿ãå Žåã以äžã®ããããã£ãèšå®ããŸãã
URIã空ã®å Žåã¯ãäœãããŸããã
ã¢ãŒã¯ã®æ
å ±ã ããåé€ããå Žåã WebMapService.removeArc()
ã䜿ããŸãã
ãã®ã¡ãœããã¯ãåé€å¯Ÿè±¡ã®ã¢ãŒã¯ã®IDïŒé·ç§»å URIãšé·ç§»å URIãURIãšã³ã³ãŒãããããããã®æååãã:ãã§ç¹ãã æååïŒãã¢ãŒã¯ã®RDFãªãœãŒã¹ïŒnsIRDFResourceïŒãã¡ãã»ãŒãžçšã®ãªããžã§ã¯ãã®ããããããåŒæ°ãšããŠåããŸãããããããŒãã®åé€ãšåæ§ã«ãã©ããæž¡ããŠãã¡ãããšããŒãæ å ±ãåé€ããŸãã
WebMapService.removeArc(message);
ã¡ãã»ãŒãžãªããžã§ã¯ãã䜿ãå Žåã以äžã®ããããã£ãèšå®ããŸãã
é·ç§»å ãšé·ç§»å ã®ã©ã¡ããã空ã®å ŽåãäœãããŸããã
èµ·ç¹ããŒãã®æ
å ±ãæ ŒçŽããŠããããŒã¿ãœãŒã¹ã®nsIRDFDataSourceã®ãªããžã§ã¯ãã¯ã WebMapService.rootDataSource
ã§ååŸã§ããŸãã
ããŒã¿ãœãŒã¹ããã¡ã€ã³ããšã«åå²ããèšå®ã®æã«ããã®ãã¡ã€ã³çšã®ããŒã¿ãœãŒã¹ã®nsIRDFDataSourceã®ãªããžã§ã¯ããååŸããã«ã¯ã WebMapService.getDataSourceForURI()
ã䜿ããŸãã
ãã®ã¡ãœããã«ãã¡ã€ã³åãURIãæž¡ããšããã®ãã¡ã€ã³ã«å¯Ÿå¿ããããŒã¿ãœãŒã¹ãè¿ããŸããããŒã¿ãœãŒã¹ã®ãã¡ã€ã«ãååšããªãå Žåã¯nullãè¿ããŸãããŸãã第äºåŒæ°ãšããŠtrueãäžãããšãããŒã¿ãœãŒã¹ã®ãã¡ã€ã«ãèªåçã«çæããŠããããŒã¿ãœãŒã¹ã®ãªããžã§ã¯ããè¿ããŸããããŒã¿ã®æžã蟌ã¿ãè¡ãå Žåã¯ãå¿ ã第äºåŒæ°ã«trueãæž¡ããŠããŒã¿ãœãŒã¹ãååŸããããã«ããŠãã ããã
var ds = WebMapService.getDataSourceForURI('https://piro.sakura.ne.jp/', true);
ãããªæ å ±å¿ èŠãïŒããšæã£ããã§ãããäžéçºè¡šã®æã«äœãç¹èšäºé ã®èª¬æãšããããšã§æ åœæå®ã«èšãããã®ã§ããã®éã®å°é家ã®æ¹ã ãèŠãã°åäŸã ãŸã以åã®ããªããããããïŒïŒãçãªããæ¹ã ãšã¯æããŸãããåã®é ã§æãã€ãæ¹æ³ã¯ãããéçã ã£ãã®ã§ãâŠâŠ
Web Mapã§ã¯ãæ°ããçæããããŒããç»é¢äžã§èªåçã«é 眮ããã«ããã£ãŠãå¯èœãªéãæ¢åã®ããŒããšéãªããªãããã«é 眮ããŸãïŒãšããããããŠãã€ããã§ãïŒã
Web Mapãå®è£ ããŠããXUL/SVG/JavaScript/XPCOMã§ã¯ããã座æšã®å Žæã®æ å ±ãåŸããšãã£ãæ¹æ³ã¯ãããŸããããããå®ã¯ãããã§ãããéçºç°å¢ã®SVGãã«ãã®Firefoxã§ã¯ãã®æ¹æ³ã䜿ããªãã£ãã®ã§ãå¥ã®æ¹æ³ã䜿ã£ãŠããããã®åŠçãè¡ã£ãŠããŸããããããã°ãªããã䜿ã£ãèšç®ã§ãã
ã°ãªããã®å€§ããã¯ãããã§ã¯ä»®ã«ãgããšããŠãããŸãããã®ã°ãªããã®å€§ããã¯ãåŸè¿°ããåºæºããŒãããåããã¡ã€ã³ãã䌌ããã¡ã€ã³ããå šç¶ç°ãªããã¡ã€ã³ããå šãç¡é¢ä¿ãã®ããããã«ãã£ãŠå€åããŸããïŒåããã¡ã€ã³ã®å Žåãæå°ãå šç¶ç¡é¢ä¿ã®å Žåãæ倧ãããããã®å Žåã®ããã©ã«ãå€ã¯16, 128, 384, 640ïŒ
äžã«ããŒãã眮ãããŠããªãã°ãªãããèŠã€ãåºããããã«æ°ããããŒãã眮ããšããããšã§ãWeb Mapã§ã¯ããŒããéãªããªãããã«é 眮ããŠããŸãã
ã°ãªããã®æ¬¡ã¯ãé 眮ã®åºæºãšããããŒãã®äœçœ®ãååŸããŸããåºæºã«ããããŒãã¯ãæ°ããããŒãã«å¯Ÿããããªã³ã¯å ãããåããã¡ã€ã³ã®ããŒããããæåŸã«ãã©ãŒã«ã¹ããããŒãããªã©ã§ãã
ããŒããé 眮ãããŠããSVGã®åº§æšç³»ã¯ãåç¹ãå·Šäžã®æ¹ã«ãã£ãŠãå³ã«è¡ãã»ã©Xã倧ãããäžã«è¡ãã»ã©Yã倧ãããšãããã®ã§ããWeb Mapã§ã¯ãã®åº§æšç³»ã«ãããŠãSVGã®foreignObjectèŠçŽ ã䜿ã£ãŠXULã®ããã¯ã¹èŠçŽ ãåã蟌ãã§ããŸãã
åã ã®ããŒãã¯foreignObjectã®ããã¯ã¹ã®äžçªå·Šäžã®é ç¹ãåºæºã«æç»ãããŠããããã®åºæºç¹ã®åº§æšã (node.x, node.y) ã§ããããããããŒãã®ã¢ã€ã³ã³ã®äžã«ã©ãã«ã衚瀺ãããšããçŸåšã®ã¹ã¿ã€ã«ã ãšã倧æµã®å Žåããã®ããã¯ã¹ã®å·Šäžã®é ç¹ã¯ãäœããªãå Žæãã«ãªã£ãŠããŸãããããåºæºã«ããŠã¢ãŒã¯ã®æç»ãªã©ãè¡ããšåŠã¡ããããªããšã«ãªã£ãŠããŸããŸãã®ã§ããã®åº§æšãšã¯å¥ã«ãåããŒãã¯ããã¯ã¹ã®äžå€®ã®åº§æš (node.centerX, node.centerY) ã®æ å ±ãæã£ãŠããŸããèªåé 眮ã®åŠçã«ãããŠãããã®äžå€®ã®åº§æšãåºæºãšããŠèšç®ãè¡ããŸãã
ã¡ãªã¿ã«ãåºæºã®ããŒããç¡ãå Žåã¯ã座æšç³»ã®åç¹ãåºæºç¹ã«ããŸãã
åºæºç¹ã決ãŸã£ãããåºæºç¹ãäžå¿ãšããååŸgã®åã®ååšäžã®ä»»æã®ç¹ (sX, sY) ãèµ°æ»ç¹ãšããŠèšå®ããŸãããgãã¯ãåè¿°ããã°ãªããã®å€§ããã§ãã
èµ°æ»ç¹ã®äœçœ®ã決å®ããX軞ããã®è§åºŠRã¯ã ä¹±æ°ãçšããŠ0ïœ360°ã®ç¯å²ã§æ±ºããŸãã
座æšã®å転ã«ã¯ãããç¥ããã以äžã®åŒã䜿ã£ãŠããŸãã
JavaScriptã§ã¯Math.sin()
ãšMath.cos()
ã䜿ã£ãŠèšç®ãå¯èœã§ããããããã®ã¡ãœããã®åãåãθã®åäœã¯ã©ãžã¢ã³ãªã®ã§ãåœç¶ãªãã θ = Rπ/180 ã®èšç®ãè¡ãå¿
èŠããããŸãã
ãªããå ã®åŒã¯åç¹ãäžå¿ãšããå転ã®åŒã§ãã®ã§ãèµ°æ»ç¹ãå転ããã«ããã£ãŠã¯ããŸããåç¹ãäžå¿ãšããååŸgã®ååšäžããå転ããããã®åŸãèµ°æ»ç¹ã®åº§æšãåºæºç¹ã®åº§æšåã ãå¹³è¡ç§»åããŠããŸãã
åºæºç¹ãäžå¿ãšããŠåè¿°ã®åºæºè§rããšã«èµ°æ»ç¹ãå転ãããæ°ããããŒããé 眮ãããç¹ã®åº§æš (newX, newY) ãæ±ããŸããïŒãªããåºæºè§rã®ããã©ã«ãå€ã¯30°ïŒ
ãããŸã§ã®æ®µéã§ã¯ãåºæºãšãªãããŒã以å€ã®ããŒããšã®äœçœ®é¢ä¿ã¯èæ ®ããŠããŸãããèµ°æ»ç¹ã®äœçœ®ã«ãã®ãŸãŸæ°ããããŒãã眮ããšãä»ã®ããŒãã«éãªã£ãŠããŸãæãããããŸãããã®ãããªäºæ ãå¯èœãªéãé¿ããããã«ãããã§ãæ°ããããŒããæ¬åœã«ããã«çœ®ããŠããã®ãã©ãããã®ãã§ãã¯ãè¡ããŸãã
以äžã®ãã§ãã¯ã§ãããã«ã¯æ°ããããŒãã眮ããªãããšå€æããå Žåã¯ãèµ°æ»ç¹ãåºæºè§rããšã«å転ããåããã§ãã¯ãç¹°ãè¿ããŠãããŸãããŸãã360°äžåšããŠããã§ãã¯ãééã§ããªãã£ãå Žåãåºæºç¹ããã®è·é¢ã2gã«ããŠããäžé±ãããã§ããŸã é§ç®ãªãã°è·é¢ã3gããšã©ãã©ãå¢ãããŠããæ°ããããŒãã眮ããå ŽæããèŠã€ãããŸã§å»¶ã èµ°æ»ãç¶ããŸãããªããããŒãã®é 眮ãã°ãã€ããããããå転ã®æ¹åã¯äžåšããããšã«ã©ã³ãã ã«å€åããŸãã
ãŸãåçŽãªãã§ãã¯ãšããŠãæåã«æã¡åºãããã°ãªãããåäœã§æä»åŠçãè¡ããŸããããªãã¡ããã®ã°ãªããã«ãå 客ãããããªããããã«ã¯æ°ããããŒãã眮ããªããšããããšã§ãã
ã°ãªããã®äœçœ®ã¯ãå
ã®åº§æšãã°ãªããã®å€§ããã§å²ã£ãç©ã®å°æ°ç¹ä»¥äžåãäžãã§æ±ããããŸãïŒMath.ceil(newX/g)
, Math.ceil(newY/g)
ïŒã
XULïŒSVGãšããXMLããŒã¹ã®å®è£
ã§ãã®åŠçãå®çŸããããã«ãWeb Mapã§ã¯å±æ§ã䜿çšããŠããŸãã
åã
ã®ããŒãã¯ãçæãããæç¹ã§ããããããèªåãäœçœ®ããã°ãªããã®åº§æšã gridPosition<LEVEL>="10:20"
ãšãã圢åŒã®å±æ§ãšããŠèšå®ãããŠããŸãïŒLEVELã¯åè¿°ã®ã°ãªããã®å€§ãããè¡šãïŒããã®ããã newGridPosition = Math.ceil(newX/g)
+':' + Math.ceil(newY/g); document.getElementsByAttribute('gridPosition<LEVEL>', newGridPosition)
ãšããŠåŸãããŒããªã¹ãã®é·ããèŠãã°ããã®ã°ãªããã«ããŒãããããã©ãããç¥ãããšãã§ããŸãã
ã¡ãªã¿ã«ãdocument.getElementsByAttribute()
ãšããã¡ãœããã¯ãå±æ§å€ãšãã®å€ãããŒãšããŠããŒããªã¹ããåŸããšãããDOM Level3ãå
åãå®è£
ããXULDocumentãªããžã§ã¯ãã®ã¡ãœããã§ãæšæºã®DOM Level2ãSVGçšã®DOMã«ã¯ååšããŸããããã®æ¹æ³ã¯XULã®äžã«SVGã®èŠçŽ ãåã蟌ãã§ããããããå¯èœãªæ¹æ³ãšãããŸãã
å ã®ãã§ãã¯ã ãã§ã¯ãæ¢åããŒããšã®ãã¢ãã¹ãèµ·ããããšããããŸãã
æ°ããããŒãã®äœçœ®ãã°ãªããã®å¢çç·ã®ãªã®ãªã§ãæ¢åããŒããé£ã®ã°ãªããã®å¢çç·ã®ãªã®ãªã«ããå Žåãå ã®ãã§ãã¯ã§ã空ãã°ãªããããšèŠãªããŠããŠããå®éã«ã¯ããŒãå士ãéãªã£ãŠããŸããŸããããããèŠãããããã«ã¯ããããã£ããã¢ãã¹ãå¯èœãªéãé¿ããªããŠã¯ãªããŸããã
Web Mapã§ã¯ãã®ããã«ãæ°ããããŒããé 眮ããã°ãªããã®åšå²ã®ã°ãªããã«ã€ããŠããããã®ã°ãªããã«å«ãŸããæ¢åããŒããšãæ°ããããŒããšã®è·é¢ã調ã¹ãããã«ããŠããŸããå ·äœçã«ã¯ãããŒãéã®è·é¢Lãã°ãªããã®å€§ããgãããå°ããïŒè¿ãïŒå Žåã«ããã¢ãã¹ãšèŠãªããããã«ã¯æ°ããããŒãã眮ããªããšå€æããŸãã
ãªããããŒãéã®è·é¢Lã¯ãäºã€ã®ããŒãããããã®äžå¿åº§æš (x1, y1) ãš (x2, y2) ãããMath.sqrt((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2))
ã§æ±ããããŸãã
æ Œåç¶ã®ã°ãªãããæ³å®ããå Žåãåšå²ã®ã°ãªããã¯å
šéšã§8ã€ããããšã«ãªããŸããçå±ã®äžã§ã¯ããã®8ã€ããããã«å¯ŸããŠãå
ã»ã©ã䜿ã£ã document.getElementsByAttribute()
ã§ããŒããªã¹ããååŸããäžã€äžã€è·é¢ãæ¯èŒããŠããããšã«ãªããŸãããã ã8ã€å
šãŠããã§ãã¯ãããšå Žåã«ãã£ãŠã¯éæ¹ããªãæéãããããŸãã®ã§ãWeb Mapã§ã¯ãåŠçãç°¡ç¥åããããã«ãæ°ããããŒãããã®ã°ãªããã®ç¬¬1ïœç¬¬4象éã®ã©ãã«ããããæåã«å€æããŠãããã«äžçªè¿ãåšå²3ã€ã®ã°ãªããã®ã¿ã«ã€ããŠãã§ãã¯ãè¡ãããã«ããŠããŸãã
æ°ããããŒããã°ãªããå
ã®ã©ã®è±¡éã«ãããã¯ã Math.ceil(Math.abs(newX/g*2)) % 2
ãš Math.ceil(Math.abs(newY/g*2)) % 2
ã®å€ãèŠãŠå€å¥ããããšãã§ããŸãããªããMath.ceil(Math.abs(newX/g*2)) % 2
ãšããã®ã¯ããã°ãªããã®å€§ãããååã«ããæã«ããã®ããŒããå«ãŸããã°ãªããã®åº§æšãã2ã§å²ã£ãäœããã§ãã
Math.ceil( Math.abs( newX/g*2 )) % 2 == 1 | Math.ceil( Math.abs( newX/g*2 )) % 2 == 0 | |
---|---|---|
Math.ceil( Math.abs( newY/g*2 )) % 2 == 1 | 第2象é | 第1象é |
Math.ceil( Math.abs( newY/g*2 )) % 2 == 0 | 第3象é | 第4象é |
ãããŸã§ã§èŠã€ãããæ°ããããŒããé 眮ãã座æšãã¯ããæ°ããããŒãã®äžå¿åº§æšãã§ããããããåããŒãã¯ãããã¯ã¹ã®å·Šäžã®é ç¹ããåºæºãšããŠæç»ãããŸãã®ã§ãããã§ååŸããå€ããã®ãŸãŸããŒãã®é 眮ã«äœ¿ã£ãã®ã§ã¯ãå Žåã«ãã£ãŠã¯ãèŠããäžã®ããŒãã®é 眮äœçœ®ã倧ãããããŠãŠäžèªç¶ãªããšã«ãªã£ãŠããŸããŸãã
ããããããŒãã®ããã¯ã¹ã®å€§ããã¯å®éã«æç»ããããŸã§ã¯æ±ºå®ãããªãããããã®æç¹ã§ãæ°ããããŒãã®æ£ç¢ºãªäžå¿åº§æšããç¥ãããšã¯å°é£ã§ãããã®ãããããã§ã¯æ¬¡åã®çãšããŠãæ°ããããŒãã®å€§ããã¯é 眮ã®åºæºã«ããããŒããšåããããã®ã¯ããšä»®å®ããŠãåºæºããŒãã®å¹ ã»é«ãããä»®ã®ãå·Šäžã®é ç¹ã®åº§æšããæ±ãããããè¿ãããã«ããŠããŸãã
ãšã¯ããããã®åº§æšã¯ãããŸã§ããããŒãã®å€§ãããè¿ããšä»®å®ããŠæ±ãã座æšããªã®ã§ãå®éã«ããŒããæç»ãããéã«ã¯ãºã¬ãçããããšãå€ãã§ããææãã ãããããããªãã§ããã
ãªããæ°ããçæããããŒãã«ã¯ãã®æç¹ã§ãã4çš®é¡ã®ãµã€ãºã®ã°ãªããããããã«ãããŠã®åº§æšããå±æ§ãšããŠèšå®ããŠããã次ã®æ°ããããŒããé 眮ããæã«åããŠãããŸããïŒããŒããèªåã§ç§»åããå Žåã¯ãã°ãªããã®åº§æšã®æ å ±ãããã«å¿ããŠèªåçã«æŽæ°ãããŸãïŒ
Web Mapã§ã¯ãããŒããé 眮ããã«ããã£ãŠãåè¿°ãããšãããæ°ããããŒããåºæºããŒããšã®é¢ä¿ããåããã¡ã€ã³ãã䌌ããã¡ã€ã³ããå šç¶ç°ãªããã¡ã€ã³ããå šãç¡é¢ä¿ãã®ãããã§ããããå€æãããããåºæºããŒãããã®é¢ãå ·åã«åæ ãããŸãããã£ãŠããã®éã®é¢ãå ·åãé©åœã«èšå®ããŠãããšã䜿ã蟌ããã¡ã«ãçæãããããããèªç¶ãšã¯ã©ã¹ã¿åãããŠããŸãã
é¢ãå ·åã®å€å®åºæºã¯ãçŸåšã®æããã¡ã€ã³åãšãªã³ã¯ã®ç¶æ³ã®ã¿ã§ãã
ããŒã¯ãŒãã§æ¯èŒãè¡ã£ãŠãè¿ãããŒã¯ãŒãã®ãã¡ã€ã³ã®æã«é 眮ããããã«ãããšããŸãããã«é¢çœãããšã«ãªãã®ã§ã¯ãªãããšæããŸãããã ãããããŸã§è¡ããšåã®æã«ã¯å®å šã«äœã£ãŠããŸãã®ã§ãããã«ã€ããŠã¯å šãæãçããŠããŸããã
Web Mapã§ã¯ãããŒãããã©ãã°ããããšã§èªåã§é 眮ãå€ããããŸãã
ããããããããã®ããŒããåããæããã£ããã£ãåããã®ã¯éåžžã«ããã©ãããã§ããè€æ°ããŒããéžæããã°ãŸãšããŠåãããŸãããéžæããã®ããã£ã±ãããã©ãããã§ããããããããã§ã3Dã¢ããªãšã®ããŒããã¯ã¹ãªã¬ãŒã·ã§ã³ïŒããŒããã¯ã¹ïŒé ç¹ïŒã®ããã«ãéžæããããŒããäžå¿ãšããŠåšå²ã®ããŒããã€ãããŠåããããªåŠçãçµã¿èŸŒãã§ã¿ãŸããã
ãã®æã®ã°ã©ãåããŒã«ã§ã¯ãå ã®ãããŒããé©åœã«ã°ãã€ããããåŠçãå«ããŠãTouchGraphãªã©ã§æ¡çšãããŠããã°ãã¢ãã«ã䜿ã£ãååŠã·ãã¥ã¬ãŒã·ã§ã³ã䜿ãã®ãäžè¬çïŒåã¢ã«ãŽãªãºã ã«ãããã¢ã觊ã£ãŠã¿ãã°ããã®å¹æãããåããïŒã ããã§ããããæ系人éã®åã«ã¯TouchGraphã®ãœãŒã¹ã³ãŒããèŠãŠããã£ã±ãæå³ãåãããŸãããããããJavaç¥ããªããè±èªããããªããã
ãããªããã§ãWeb Mapã§ã¯ã°ãã¢ãã«ã®ä»£ããã«ãã£ãšæ³¥èãã¢ã«ãŽãªãºã ã䜿ã£ãŠãäžèšã®ãããªæåãå®çŸããŠã¿ãŠããŸãããã®çã®æ¹ã«ãšã£ãŠã¯åŽé£¯ãã®ã ãšã¯æããŸãããåã®é ã§ã¯ãããéçãªã®ã§ãâŠâŠïŒããã°ã£ãããªïŒ
åœããŒããã¯ã¹ãªã¬ãŒã·ã§ã³ã®çå±ã¯è³æ¥µåçŽã§ãããã©ãã°ããŠããããŒãããã®é¢ãå ·åã«å¿ããŠãåšå²ã®ããŒããå°ãªãã«ç§»åããããšãããã®ã§ããå ·äœçã«å³ã亀ããŠèª¬æãããšã ããã ãããªãã«ããã£ãŠã ãã©ãã°ããããŒãã®ç§»åè·é¢ãM1ããã®ããŒãã«L1ã®è·é¢ã§é£æ¥ããããŒãã®ç§»åè·é¢ãM2ãããã«ãã®ããŒãã«L2ã®è·é¢ã§é£æ¥ããããŒãã®ç§»åè·é¢ãM3ãšãããæã«ããã©ãã°ããããŒãããã®è·é¢ïŒ0, L1, L1+L2ïŒãšãå ã®äœçœ®ããã®ç§»åè·é¢ïŒM1, M2, M3ïŒã®éã«ãè² ã®çžé¢é¢ä¿ãæãç«ããããšããããšã§ããããã®ãè² ã®çžé¢é¢ä¿ããããã«å®çŸ©ãããããã±ã£ãšèŠã§ã®ãèªç¶ãªã°ãã£ãœãããæŒåºã§ãããã©ããã®ãã€ã³ãã«ãªããŸãã
è©Šè¡é¯èª€ããã£é£ã°ããŠããšããããåã䜿ãããšã«ããèšç®æ¹æ³ã¯ãããªæãã§ãã
åºæºãšãªãè·é¢Lã¯ããšããããããããŒãã®é«ãhããšãnode1ããçŽè¿ã®é£æ¥ããŒãnodeNãŸã§ã®è·é¢dNã®ãdN/håãã®ãã¡ã®çãæ¹ã䜿ãããšã«ããŸããããã¯JavaScriptã§ã¯ä»¥äžã®ããã«ãªããŸãã
var h = node1.height;
var dN = Math.sqrt(
(node1.centerX - nodeN.centerX) * (node1.centerX - nodeN.centerX) )
- (node1.centerY-nodeN.centerY) * (node1.centerY-nodeN.centerY)
);
var L = Math.min(h, dN*(dN/h));
ãªãå¹ ã§ã¯ãªãé«ãããšãããšãããŒãã®å¹ ã¯ã©ãã«æååã®é·ãã«ãã£ãŠå€§ããå€åããããã§ãããŸããããŒãå士ãéãªãããã»ã©è¿ãäœçœ®ã«ããæã¯ãããŒãå士ã®è·é¢ã®æ¹ãçããªãã®ã§ããã¡ããåºæºã«ããŸãã
äœæ è·é¢ã®ãdN/håãããšãããšïŒãããã¹ã€ã«1å以äžãªãäœåã§ãæ§ããªãã®ã§ãããã ãããdN/hããšããåŒèªäœã«ã¯æ·±ãæå³ã¯ãããŸããïŒãããã1åã ãšãçŽè¿ã®é£æ¥ããŒãnodeNã®ç§»åè·é¢ã®ä¿æ°ã1ã«ãªã£ãŠããŸãããã§ããä¿æ°ã1ãšããããšã¯ãã€ãŸããå®éã«ãã©ãã°ããŠããããŒãnode1ãšå šãåãåã ãåããŠããŸããšããããšã§ããããã§ã¯èŠãç®ã«ãŸããã®ã§ããšãããã1ããå¿ ãå°ãããªãããã«ãdN/håããŠãŸãããããããã§ããã
â(L/d) ãJavaScriptã§æžããš Math.sqrt(L/d)
ãšããåŒã¯ãããã€ãã®åŒãè©ŠããŠã¿ãŠãæ¯èŒçãããã£ãœããèŠããããªïŒããšæããç©ã§ããä»ã«ã L/d ïŒããã¯åšå²ã®ããŒãããããŸãã€ããŠããŠãããªãã£ãïŒãšã (L/d)2 ïŒããã¯åšå²ã®ããŒããå
šç¶ã€ããŠããŠãããªãã£ãïŒãšãè²ã
è©ŠããŸããããèªåã¯ãããäžçªãã£ããæ¥ãŸããããã®ããããããããã§ãããå
šç¶è«ççãããªãã§ããã
æ £æ§ãšãããšå€§å±€ã§ãããèŠããã«ããããããŒããŸã§åãããªãããã«ããããšããããšã§ãã
ãããããæ¬åœã«ç©çã·ãã¥ã¬ãŒã·ã§ã³ã«ãªã£ãŠãããªããããããŒããåããããšããŠããä»ã®ããŒãã¯æ £æ§ã«ãã£ãŠçŸåšã®å Žæã«ãšã©ãŸãããšããã¯ãã§ãããŸããããããã®åãé£ãªã£ãŠããããŒãïŒãã®å³ã§ããã°Eãªã©ïŒã¯ãåããŒãéã«åŒãçããããåãå ããããã匷ãçŸåšã®å Žæã«ãšã©ãŸãããšããã¯ãã§ããããããç©çã·ãã¥ã¬ãŒã·ã§ã³ãªãã§ããã£ãœãåçŸã§ããªããã®ã ãããããšããã®ããããã§ã®æ¬é¡ã§ãã
Web Mapã§ã¯ããã®ãããªå¹æãåºãããã«ãå ã®èšç®ã«ãããŠdã«åããŒãã®æ°NããããŠããŸãããšããããšã¯ãå ã®ä¿æ°ãæ±ããåŒã¯å®éã«ã¯ â(LN/d) ãšãã圢ã§äœ¿ãããŠããããšã«ãªããŸãã
dãå¢ãããšããããšã¯ãnode1ããã®è·é¢ãé ããªã£ãã®ãšåãæ±ãã«ãããšããããšãªã®ã§ããããã®çµæãšããŠãã¶ãäžãã£ãŠããåããŒãã®æ°ãå€ããã°å€ãã»ã©å ã®ä¿æ°ã¯æ¥µç«¯ã«å°ãããªããŸããã€ãŸããå€æ°ã®åããŒãã«åŒãçããããŠããã®ãšã䌌ããããªãçµæã«ãªããšèšããŸãã
ããã§ã©ããŸã§ãããã£ãœããåãã«ãªãã®ãã¯åãããŸãããããšããããéåžžã«äžèªç¶ãªåãã«ãªããããªæ°ãããã®ã§ããããã£ãããªã®ã§äœ¿ã£ãŠã¿ãŠãã次第ã§ãã