Auto Center and Zoom with YM4R

When I blogged last month about abstracting mapping with YM4R I commented: What I’ve not yet discovered (and may not be implemented) is a way to automatically center and zoom a map. It would be very nice to be able to add a batch of points to a map and have the plugin automatically work out their mid-point. Maybe I need to work on that a little… What I was missing was the center_zoom_on_bounds_init method. There are various ways to interact with it, but I’ve chosen: ...

Abstracting mapping with YM4R

When Grand Rapids WiFi–then a PHP application–first implemented google map support all the logic for producing those maps came in the templates. The controller passed the view a list of locations for that page, and it wrote out a series of javascript calls that produced the map. It was a little unreliable and very clunky, but it worked. When I moved the app over to rails, that was one aspect that I didn’t change, and it continued to work. ...

More WiFi Google Mapping

There has been much jubilation since Google announced their javascript-based maps API yesterday. I’ve been playing with it a little and have updated the Grand Rapids WiFi google map to use the new API. The web pages produced this way are much more responsive than those using the old hacks, and it’ll be great to see what people produce now we have official support. I’m hoping to shortly release a new version of the WiFi site which allows search results to be plotted on a map (or viewed as a list as at present). Until then, this implementation remains ’experimental'. ...

Google Maps and Grand Rapids WiFi

For the past few weeks I’ve been meaning to play with myGmaps, and last night I finally got the opportunity. I’d introduced a map view to Grand Rapids WiFi a few months ago, but I’ve never been entirely satisfied with the map in use or the flexibility of the zoom, so I decided to explore what it would take to move that data onto a google map. Generating the required XML was very straightforward. Between this piece at Engadget and the tools at myGmaps it was very simple to add a new Smarty template to the site and get everything up and running. It’s a shame google didn’t go with some more standardised vocabularies (it would be wonderful to be able to pipe the existing RDF version of the site straight in), but at least the format is simple. ...