Map Layers plugin
Plugin details
Documentation
Install the plugin:
ruby script/plugin install http://www.sourcepole.ch/svn/plugins/map_layers/trunk
Create a controller and a view
./script/generate controller Map index
Add the map viewer initialization to the index action in the controller:
@map = MapLayers::Map.new("map") do |map, page| page << map.add_layer(MapLayers::GOOGLE) page << map.zoom_to_max_extent() end
Add this to the head of your view:
<%= map_layers_includes :google => "ABQIAAAA3HdfrnxFAPWyY-aiJUxmqRTJQa0g3IQ9GZqIMmInSLzwtGDKaBQ0KYLwBEKSM7F9gCevcsIf6WPuIQ" %>
Put a map in the body your view:
div id="map" style="width: 512px; height: 256px;"> <%= @map.to_html %>
Test your basic map with http://localhost:3000/map
Further Documentation
There is currently no advanced documentation for this plugin.
New documentationEdit plugin | Back in time (9 older versions) | Last edited by: pka, about 1 month ago

