On Dec 9, 1:05 am, Mike Williams <[email protected]> wrote:
> 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.
Yes, I was thinking about XSLT. You say that probably won't work. Why?
Is it because of the way the API does things?
Remember, XML, XSLT, and Google Maps API stuff is all new to me - only
been at this for about a month!
> 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";
Oh oh!!! Looks like I may have just gotten myself into more that I was
looking at.
Anyway, here's a start on my XML file with some real data:
http://www.xmxpro.com/catalog%20-%20from%20website.xml
And this is the current information in a very long table:
http://www.xmxpro.com/Catalog/catalog.htm
Of course, if I convert the table to a map, I won't need stuff such as
the listing of the nearest cities. There's prtobably other stuff in
the table (such as the restrictions) that would probably leave out.
Just want to give everyone a view of where the OHV areas/trails are
and let them select the one(s) they want ot use.
Thanks
Paul
--
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.