Friday, July 14, 2006

Making a Rails server, parsing KML in JS


If you are doing Rails, this is a pretty good way of doing it (Mongrel+Apache+Capistrano). Fast and stable...


I had to bail out on the Cartographer plugin because doing stuff like:

<%= gmap(:mapname=>"my_map", :width=>"50", :height=>"120") %>

<%= gmap(:width=>"500", :height=>"500", :type=>:satellite, :point=>[-122.14944, 37.441944]) %>

just isn't enough easier for me. I kept having to look at the generated JavaScript, since there was stuff I just had to tag in there. I did finally start parsing my own KML in there with the GXml parser, however, it's definitely faster to just generate JSON on the server side if you are doing anything with a lot of data. However, the capability to parse a fair subset of KML is worthwhile, so I am not throwing it away just yet.

0 comments: