This project has moved and is read-only. For the latest updates, please go here.

Image Map in Conceptual Content

Apr 15, 2009 at 9:16 AM
Is it possible to create an image map in conceptual content? The only way I can see to do it is using Additional Content, which is not ideal.

<img src="../media/foo.png" usemap="#foomap"/>
<map name="foomap">
  <area shape="rect" coords="x,x,x,x" href="some id or other"/>

I can't seem to find anything about this anywhere; perhaps it is not something people wish to do generally?

Thanks in advance,
Apr 15, 2009 at 4:01 PM
Apply the Sandcastle Styles patch to Sandcastle if you haven't done so already (  Once applied, you can use the <markup> element to wrap the literal HTML for the image map so that it passes through to the topic as is.  Normally, you should stick with the MAML elements rather than HTML but in cases like this where there is no equivalent, the <markup> element can be used to insert literal HTML.  See the MAML guide also available from the Sandcastle Styles project for more information.

Apr 15, 2009 at 4:24 PM
Many thanks, Eric - just what I wanted.
May 27, 2009 at 12:54 AM

Moving a little further along this implementation...

How should content within code comments be referred to from an image map area?

Are cref resolutions attempted by the compiler for content within <markup> tags like other MAML content?
  - It appears not, as "T:[Namespace][class]" does not produce an image 'hotspot'

If only hrefs are available, how does one refer to a namespace class within the same chm file?
- I've tried variations of the full pathname "mk:@MSITStore:[path][filename].chm::/html/T_[Namespace]_[Class].htm" with no success.


- Fred

May 27, 2009 at 1:24 AM

The name of the topic for API memebers will depend on the naming method used.  See the NamingMethod property documentation for more information.  Once you have the name, you can use it with a ".htm" extension as the href URL.



May 28, 2009 at 6:21 PM

For future thread readers:

The name to be used can be verified by right clicking on any API class node in the TOC and selecting 'Jump To Url...'
The text in the Current url that follows '/html/' is the necessary value.

  Project Naming Method: MemberName
  Code Class name: Finance.Invoice
  TOC Url for the class: mk:@MSITStore:C:\Dev\APAR\Help\APAR_Reference.chm::/html/T_Finance_Invoice.htm
  MAML code for an image hotspot link: 
      <image src="ObjectModel.gif" usemap="#ObjectModel">
      <map id="ObjectModel" name="ObjectModel">
        <area shape="rect" coords="0,0,100,100" href="T_Finance_Invoice.htm" />
      </ map>
    </ image>  
  </ markup>

Also note that using F5 to 'Preview Topic' for the aml page does not result in links that work.
You have to do a full build to test that validity of the links.

- Fred