The map below is a 1.5MB KML file which openlayers seems to render quite happily with out making your browser explode. (chome is fine, firefox is not so fine). The full screen control is quite useful. If, like me you get frustrated with tiny little maps embedded in pages. Its the little button on the top right --------------------------------------------------------------------------------------------------------------------------------------------------------->
Openlayers itself has a bunch of nice features: - It can pull the track names out of the KML and display them in tool tips. - Full screen map (I know I said that already) - Shift click selects a box and zooms into that, much faster than mouse wheeling forever. - Can display maps from multiple sources google, openstreetmap etc - There is feaure editing tool that allow you to draw lines and polygons
More details after the break Wasn't too painful to code this up. (Once the module author got me started on some drupal cck foo). The module, for those that care, is here. It just adds the formatter 'KML Openlayer Map' to filefield. Next step is to get the descriptions from the KML displaying in a popup. One caveat with openlayers and kml is: To get openlayers to display local kml files you need to comment out the line with "OpenLayers.ProxyHost" in openlayers.js in the openlaylayers module. I believe this has been fixed in the CVS version.
|
|||

retarded comment subject
A script on this page may be busy, or it may have stopped responding. You can stop the script now, open the script in the debugger, or let the script continue.
Script: http://openlayers.org/dev/OpenLayers.js:181
openlayers is great but i can kill firefox 3.5 very dead, Just think what it does to ie
you know u dont have to write anything in the subject field eh?
This is due do the number of tracks we are displaying. not strictly openlayers fault. I imagine 200+ tracks would make firefox creak a bit when using google maps directly.
quote from Ians test results (http://tracks.org.nz/features/74):
Why do comments need a subject?
Hmm perhaps i should update my script and start running it regularly since you seem to be doing something useful with it.
While its seems to render fine in Chrome even ff seems to choke on it a bit. I shudder to think what it does to ie. Is it just me or does the comment interface change every few days, is that a drupal feature?
Adding full screen maps to Tracks
Nice. I've previously contemplated adding a full screen toggle to the www.tracks.org.nz Google Maps. Turns out to be quite straightforward, using a bit of borrowed code, as shown in the Full screen map feature request.
Cheers,
Ian.
fullscreen maps
Cheers Ian, Yeah it'd be good to see fullscreen maps on tracks.org.nz (chipped in my 2c on that feature request). Also, now that I think about it, is there any reason that all tracks from a given area couldn't show on a map? So adjacent tracks would then only need to be added if they didn't belong to the same area as the current track.
Testing how many tracks can be displayed
Just to see how many tracks the Google Maps API can cope with simultaneously, I've put together a set of test cases.
It turns out that, not surprisingly, the answer depends on the browser and particular computer. Some results are listed in a comment on Tracks feature request 74.
Awesome! sounds like
Awesome! sounds like displaying all tracks in a given area is going to be do-able then? I think the area with the most tracks is Whakarewarewa with 36, and from your test cases you say even IE can handle 50 tracks. In conjunction with fullscreen, I think this would be a big UI improvement for tracks.org.nz.
Showing more tracks at once
Earlier versions of the Google Maps API would implode if it attempted to display more than a few tracks at once. More recent versions can cope with more tracks, and encoding the data (rather than using the kml files directly) also helps.
The net effect is that it is now possible to display quite a lot of data simultaneously - possibly all the tracks in an area, in most cases. I think a bit of experimenting is in order, to see how far the API can be pushed before it becomes too sluggish...
Cheers,
Ian.