Wasn't it paulp575 who wrote:

>I've never written an XML file before - other than copy some of your
>excellent examples. Just went out to the w3schools website and took a
>quick course in XML and it appears I can link the XML file to a style
>sheet so my sidebar can be just about any format I like. Is this pretty
>much a correct assumption?

If you're talking about xslt, then I suspect that might not work. Other
than that, I don't know what you're talking about.

Whatever file format you use, you need to have a chunk of Javascript
that parses the data to extract the individual fields, and then builds
the sidebar entry using the information in those fields. The layout of
the sidebar is controlled by the code that builds the sidebar entry.

For example, instead of writing

side_bar_html += '<a href="javascript:myclick(' + (gmarkers.length-1) +
')">' + name + '<\/a><br>';

I could write

side_bar_html += '<div onclick= "javascript:myclick(' +
(gmarkers.length-1) + ')"><h2>' + name + '<\/h2>' +html+ '<hr><\/div>';

which gives a whole different look to the sidebar, with the "name" in
<h2> and the "html" in normal text.

[That actually looks rather ugly, but you get the general idea. Making
it pretty us just conventional HTML styling.]


To highlight the sidebar you'd add something like
   ... id="sidebarEntry' + (gmarkers.length-1) +'" ...
to the code that generates the sidebar div. Then the myclick(i) code
could perform
   document.getElementById("sidebarEntry"+i).style.backgroundColor =
        "#FFFF00";

-- 
Mike Williams
http://econym.org.uk/gmap


--

You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-api?hl=en.


Reply via email to