I’ve been wanting to get to grips with the Google Maps application for sometime because the geographer in me recognises it not only as a useful tool, but a spatial data godsend. I’ve been using Google Earth for sometime, but Google Maps lets you do some cool stuff. After trying a few different plugins that utilise the Google Maps API, I’ve decided to use Avi Alkalays version to develop the Singletrack Magarchive website.
I’ve long recognised that my previous method of illustrating the various locations of Singletrack’s route guides had limitations. The largest being the poor spatial resolution a fairly big marker on a smallish map had. Google Maps gets around that with its use of scalable vector data and geocoded tags. Better still each of the marker point tags can be customised to include images and hyper links.
This means that every time you click on one of the markers in the new route guide section you get the details of the route and a link to the magazine page in the archive. I’ve added in the Singletrack Office location too. I’m hoping that this new approach will also solve the second concern I had – In places like Calderdale and the Peak and Lake Districts, some of the points were so close together that they were quite off the mark. I’m pleased with the end result and will be applying this to some websites at work.
There’s a few things I’d like to be able to tweak, least not being able to number each of the marker points rather than just have a black dot in them. I’ll have to get to grips with the Mapplets documentation first, but I think it’s do-able. Here’s a quick demo:
10 thoughts on “Google Maps API”
For instance I’ve been playing with Google Maps for the local hunt – http://www.vlhunt.com/fancy-coming-hunting/vlh-map/. The thing is that Google have developed their own site so much that it’ easier for me to let them do all the hard work for me, and just pass them a KML file – http://maps.google.com/maps?q=http://vlhunt.com/vlh_map.kml
This also gives the end-user more choice in what they do with the map – they can’t get directions on my version for instance unless I find the time to learn how to code it – and the KML file is compatible with Google Earth, allowing users even more choice in what to do with it.
* sometimes perl is too blunt.
Thanks for the feedback Nick. I’ll take a look at that script and see if it does what I want…
You got mail – I’ve looked at Avi’s script since I write, and I can modify that to do what you want so you don’t have to change plugin.
In fact I’ll probably amend the VLH site to use this plugin once I’ve modded it.
Actually I’ve modified the VLH site now so the vlhunt.js contains my modified version of Avis plugin to allow markers to be identified by letter.
Quiet day at work then 😉
That looks like a nice solution. I’ll have a look at my email when I get home. You may want to look at this for the VLH site:
In the dl style add in â€visibility: hidden;â€ title=â€googlemapâ€…etc
Using style=â€visibility: hiddenâ€ will make the browser hide the map definititon text while loading the page. Seconds later, when the plugin renders the maps on your page, the hidden blocks will finally appear as maps.
Not quite as nice as you previous one that used to display ‘loading google map”, but I’m sure it wouldn’t be too difficult to do that either.
Of course having had a fettle with Google Map KML files, I can now get them to do exactly what I was after 🙂
Here’s an example:
Mmm. Must look at that. I want to show customised fence markers on the VLH site.
You basically create style sheet type items in the KML header and relate them down to the individual placemarks. Take a look at the KML file for an example:
It’s not however exactly what I want it to do. Ideally for the Singletrack Mag Archive Routes Page I want it to dynamically number the placemarks rather than have to create png thumbnails. I need to do a bit more work on that to find a way forward.
I’ve also been playing with the vector functionalities for producing polygons as I’d been using the route plotting function to scope out the potential for recording and sharing rides. It might be a cool thing to setup on Cheekytrails…