Wasn't it paulp575 who wrote:
>I am working on a map that will display the OHV (4x4, ATV, and dirt
>bike) areas and trails in the state of Washington.
>
>My current map, in the very early stages of development, is located
>here:
>http://www.xmxpro.com/Catalog-map/catalog-map.htm
>
>Before going too far, I want to get input on which type of data file
>to use: XML, KML, or text file.
If you want other people to share your data (e.g. for Google to index
your data file directly) use KML. Otherwise avoid KML because you want
to do things that are not directly included in GGeoXml, EGeoXml or
GeoXml, so it all gets a little messy.
The speed differences between the different formats is not very
significant. XML files are more verbose, so they take a bit longer to
fetch. Plain text files are very compact, so the data loads faster, but
they take more CPU time to parse because you're actually parsing them in
Javascript rather than throwing the whole file at a browser routine that
runs in compiled code. JSON is pretty compact and parses blindingly fast
if you use eval(), which should be safe if you're loading the data from
your own website. KML loses out on both counts by being very verbose and
(since you can't do the things you want to do with GGeoXml) is parsed in
Javascript.
So choose whichever of XML, Plain text or JSON you find easiest to
generate.
The main thing you need to think about is the total amount of data that
you're going to need to work with.
E.g. if you've got 2000 markers and each marker uses 4k of data, then
you'd be looking at 8mb of data. Allowing for start and stop bits,
that's 80 megabits, which would be expected to take 80 seconds to fetch
on a 1 megabit broadband connection.
If you end up with an unacceptable load time, then consider server side
clustering.
>I would like to use a KML data file so I could have a little more
>description in the side-bar - similar to the current Google Maps, but
>understand that is not possible due to wanting to use the hidden and
>show feature while using marker categories.
Your choice of data file type doesn't limit what you can put in the side
bar. My examples only use a short name field for the side bar info
because I was too lazy to write long descriptions into my data. You can
easily add fields to your data that are the equivalent of KML
<description> and <Snippet> tags.
Because you're writing your own code and designing your own data, you
can do whatever you like.
>Would also like the side-bar item to be highlighted when a marker on
>the map is clicked on.
In order to achieve that, you need to add a unique "id" attribute to
your sidebar entries. Then, when gmarker[i] gets clicked you can access
document.getElementById("sidebarEntry" + i) and change its style.
Remember which sidebar entry is currently highlighted, so you can
unhighlight it whenever you see an "infowindowclose" event.
--
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.