Skip to content

Commit

Permalink
Center the map on the whole district, rather than one of its polygons
Browse files Browse the repository at this point in the history
Conflicts:

	app/controllers/districts_controller.rb
  • Loading branch information
Empact authored and Rio517 committed Jan 3, 2013
1 parent d94fd9a commit 5fd273e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/controllers/districts_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ def polygon
@zoom = @map.get_bounds_zoom_level(GLatLngBounds.from_georuby(poly.envelope))
@center = GLatLng.from_georuby(poly.envelope.center)
@polygon = GPolygon.from_georuby(poly,"#000000",0,0.0,"#ff0000",0.3)

private

def load_envelope
@envelope = @districts.federal.first.the_geom.envelope if @districts
end

def mdata
Expand Down

0 comments on commit 5fd273e

Please sign in to comment.