HTML Markup for notes and other map content | Feedback E-mail this topic Print this topic

In ArcGIS Explorer you can add a note anywhere on your map using any of the Notes buttons in the Home tab's Create group task. This may be useful if you are collaborating with others and need to record something observed or discovered. Each note has a title, text, and an associated shape that you can sketch on the map. This holds true for all items that result from the execution of a button, such as Find or Measure > Add to Map. When you create views you also have the opportunity to display associated information and you can present descriptive text in a popup window when the map opens by supplying content for the map's description. Finally, you can import text files that have multiple locations in the form of latitude/longitude coordinate pairs, US National grid coordinates, MGRS coordinates, as well as in any other coordinate system, or a file containing addresses. For each coordinate pair, coordinate, or address, ArcGIS Explorer will create a note. In addition to marking the locations on the map, you can associate the contents of a field with that location and display it when you click on the symbol that marks the location.
Learn more about adding text files
Learn more about Note properties

In all of the instances cited above, you can supply plain text as the note text or as the description of the location. In addition to plain text, and perhaps more usefully, you can supply HTML markup as note text or as the contents of your file's Description field. This can include images, links, even forms, stylesheet references, or other markup. It is also possible to provide an url or file path. Following are some examples of what you can do. For each of these examples, the HTML markup cited would be entered as the note's popup window text, or in the added text file's Description field. Note that the markup is formatted the way it is here only for ease of reading.

##### To open a Web page in the window associated with the note or other content

    http://www.esri.com

##### To display text and a link to a Web page

    <html>
    <p>A link to the Esri Web site follows this text. It will appear in this window.</p>
    <a href="http://www.esri.com">Link to the Esri site</a>
    </html>

##### To display text and a link to a Web page in a separate window

    <html>
    <p>A link to the Esri Web site that opens in another window follows this text</p>
    <a href="http://www.esri.com" target=_blank>Link to the Esri site</a>
    </html>

##### To specify inline styles

    <html>
    <body style="color:white;background-color:navy">
    <h3>The Window's Headline</h3>
    <p>The text of the body of the window is white and the background color is navy, whereas the attributes of the span below are different.</p>
    <span style="color:black;background-color:yellow">This is some text in a span block</span>
    <p>Some text following the span</p>
    </body>
    </html>

##### To incorporate an external stylesheet to set styles in a popup window

    <html>
    <head>
    <link rel="stylesheet" href="http://myserver/styles/mystylesheet.css" Type="text/css">
    </head>
    <div class=divStyle2>This div has all the attributes of the class divStyle2 in mystylesheet.css.</div>
    </html>

##### To use an external Javascript file that contains additional functionality

    <html>
    <head>
    <script href="http://myserver/scripts/myfuncs.js"></script>
    </head>
    <body>
    <div class=divAction onclick="performAction()">When you click on this text a Javascript function named performAction will execute.</div>
    </body>
    </html>

Notes

- You can't specify a relative path so local content must use an absolute path and will only work on another machine if both machines have the same directory structure.
- If you're using any of the Note buttons, you can enter the HTML markup in the popup window right when you create the note. When you open the note by clicking on the symbol associated with it, the HTML will be parsed and rendered as if you opened it in a Web browser. To edit existing note content, click the Edit Popup button at the bottom right of the popup window:
- If you create HTML with the <html> element you are responsible for formatting the text. If the note doesn't contain the <html> element, ArcGIS Explorer will interpret <CR> <LF> (carriage return, line feed) sequences and add a
  element to insert a line break.
- ArcGIS Explorer always displays links in a separate window, so if you write Javascript, there's no need to write code that pops up a separate window to display content.