From: Richard Fairhurst Date: Fri, 1 Feb 2008 17:19:11 +0000 (+0000) Subject: Potlatch 0.7 X-Git-Tag: live~7899 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/da76d64e93fc2892ab567f4ca6dc9a6eac4385b6?ds=inline Potlatch 0.7 --- diff --git a/app/controllers/amf_controller.rb b/app/controllers/amf_controller.rb index e83ed4bb1..2ef309fee 100644 --- a/app/controllers/amf_controller.rb +++ b/app/controllers/amf_controller.rb @@ -733,11 +733,11 @@ class AmfController < ApplicationController # Co-ordinate conversion def lat2coord(a,basey,masterscale) #:doc: - -(lat2y(a)-basey)*masterscale+250 + -(lat2y(a)-basey)*masterscale end def long2coord(a,baselong,masterscale) #:doc: - (a-baselong)*masterscale+350 + (a-baselong)*masterscale end def lat2y(a) #:doc: @@ -745,11 +745,11 @@ class AmfController < ApplicationController end def coord2lat(a,masterscale,basey) #:doc: - y2lat((a-250)/-masterscale+basey) + y2lat(a/-masterscale+basey) end def coord2long(a,masterscale,baselong) #:doc: - (a-350)/masterscale+baselong + a/masterscale+baselong end def y2lat(a) diff --git a/app/models/geo_record.rb b/app/models/geo_record.rb index e675b11e0..08808d352 100644 --- a/app/models/geo_record.rb +++ b/app/models/geo_record.rb @@ -29,13 +29,13 @@ class GeoRecord < ActiveRecord::Base return self.longitude.to_f / 10000000 end - # fuck knows + # Potlatch projections def lon_potlatch(baselong,masterscale) - (self.lon-baselong)*masterscale+350 + (self.lon-baselong)*masterscale end def lat_potlatch(basey,masterscale) - -(lat2y(self.lat)-basey)*masterscale+250 + -(lat2y(self.lat)-basey)*masterscale end private diff --git a/app/views/site/edit.rhtml b/app/views/site/edit.rhtml index fa693051b..ab6d70575 100644 --- a/app/views/site/edit.rhtml +++ b/app/views/site/edit.rhtml @@ -46,8 +46,9 @@ <%= javascript_include_tag 'swfobject.js' %>