HTML image map as SiteNavigationElement

杀马特。学长 韩版系。学妹 提交于 2019-12-11 12:09:17

问题


I’m planning to use an HTML image map as a schema.org SiteNavigationElement.

The idea is to use the image as a venue map and as a visual aid to find local business in my area.

The code was validated through the Google Structured Data Testing Tool and everything seems to be ok.

<div itemscope itemtype="http://schema.org/SiteNavigationElement" >
  <div itemprop="name">the name</div>
  <div itemprop="description">the description</div>
  <img itemprop="image" src="map.jpg" usemap="#map_tag"/>
  <map name="#map_tag">
    <area itemprop="url" coords="1, 2, 3, 4" href="link1.php" shape="rect" alt="alt_text1"/>
    <area itemprop="url" coords="5, 5, 7, 8" href="link2.php" shape="rect" alt="alt_text2"/>
  </map>
</div>

Is this a valid use for SiteNavigationElement?


回答1:


No, the url property of SiteNavigationElement is for the URI of the navigation (it’s unlikely to have one), not for the URLs of the links the navigation contains. See my answer to "What is the correct use of schema.org SiteNavigationElement?".

Apart from that, it seems to be appropriate. However (to be sure, as you are only using example text), the name should give the name (and the description the description) of the navigation itself, not of the page etc.

(Note that it’s typically not very useful to use these WebPageElement types to begin with. It gets from time to time discussed to deprecate them in Schema.org. I’d only use them in very specific/rare cases.)



来源:https://stackoverflow.com/questions/32084978/html-image-map-as-sitenavigationelement

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!