[Geomoose-users] Scalebar & Measure
Brent Fraser
bfraser at geoanalytic.com
Thu May 27 11:02:01 EDT 2010
Good.
Should we just hard-code it within Geomoose (as below), or provide a
configuration parameter in the mapbook?
Brent
Len Kne wrote:
> Very nice! Worked great and is much simpler than the way I was doing the calculation.
>
> Len
>
> -----Original Message-----
> From: Brent Fraser [mailto:bfraser at geoanalytic.com]
> Sent: Wednesday, May 26, 2010 1:53 PM
> To: Len Kne
> Cc: 'geomoose-users at lists.sourceforge.net'
> Subject: Re: [Geomoose-users] Scalebar & Measure
>
> Len(and others interested in measuring),
>
> Here's my solution to the measure problem:
>
> In main.js somewhere around line 138 add the two lines below marked with a "//BWF":
>
> Tools['measure'] = new
> OpenLayers.Control.GeoMooseMeasure(OpenLayers.Handler.MeasurePath,
> measureToolOptions);
> Tools['measure'].geodesic = true; //BWF
>
> Tools['measurearea'] = new
> OpenLayers.Control.GeoMooseMeasure(OpenLayers.Handler.MeasurePolygon,
> measureToolOptions);
> Tools['measurearea'].geodesic = true; //BWF
>
> Thoughts?
>
> Brent
>
>
> Brent Fraser wrote:
>> Paul, Len,
>>
>> Our scale problem is a (mostly) map projection issue. All map projections
>> introduce distortions in trying to represent a round(ish) Earth on a flat plane.
>> Mercator is no different: it is like wrapping an up-right cylinder around the
>> Earth, projecting light from the center onto the cylinder
>> (http://en.wikipedia.org/wiki/Mercator_projection). As you can imagine the
>> distortions get "worse" the further from the equator. The distortions can be
>> modeled as a Point Scale Factor. At the equator the Point Scale Factor is 1.0,
>> at latitude 60 degrees North (or South), the scale factor is 0.5!
>>
>> So what's the solution? Here's mine:
>>
>> 1. Enhance Proj4 (and Proj4js) to return the Point Scale factor (given the
>> projection and a location)
>> 2. Enhance MapServer and Openlayers to use the Point Scale Factor in
>> calculating distances and scale.
>>
>> I'm trying to drum up interest, but so no takers....
>> http://osgeo-org.1803224.n2.nabble.com/Point-Scale-factor-service-td4938743.html
>>
>> http://osgeo-org.1803224.n2.nabble.com/Re-3265-Scale-dependent-layer-switching-error-with-Mercator-td4966902.html
>>
>> Best Regards,
>> Brent Fraser
>>
>> Len Kne wrote:
>>> The scale bar issue with the web Mercator projection is a limitation of
>>> OpenLayers, the application GeoMOOSE 2.x uses to render the map frame.
>>> There has been discussion on the OpenLayers site about providing a
>>> patch (this link offers a patch http://trac.openlayers.org/ticket/1890 )
>>> in the next version 2.9. I'm sure GM will upgrade to OL 2.9, but not
>>> sure there is any schedule in place to do this.
>>>
>>>
>>>
>>> The cursor issue is also kind of fun because it seems each browser
>>> handles the custom icons differently. Here's the attribute in the
>>> mapbook which defines the query for the Identify service:
>>>
>>>
>>>
>>> cursor="url('cursors/identify2.cur') 9 9,url('cursors/identify2.cur'),auto"
>>>
>>>
>>>
>>> This makes three attempts to draw the cursor, the first offsets the
>>> mouse click 9 pixels from the top and the left. Firefox can use this
>>> value and seems to line the mouse click up pretty good with the
>>> crosshair. However, IE cannot handle the offset adjustment, so it reads
>>> the second cursor definition. There are tools like AT File Mole which
>>> can be used to edit the hotspot of a cursor. Attached is the latest
>>> version I have been using for Identify service, again this seems to line
>>> the crosshair up pretty well with the mouse click. If you are using
>>> Safari or Chrome, these setting don't seem to work at all and I would
>>> recommend not using customer cursors with those browsers.
>>>
>>>
>>>
>>> Len
>>>
>>>
>>>
>>> *From:* Wirth, Paul [mailto:Paul.Wirth at kniferiver.com]
>>> *Sent:* Saturday, May 01, 2010 9:03 PM
>>> *To:* 'geomoose-users at lists.sourceforge.net'
>>> *Subject:* [Geomoose-users] Scalebar & Measure
>>>
>>>
>>>
>>> Two questions:
>>>
>>>
>>>
>>> 1. I have a web Mercator application, and I noticed that the
>>> scalebar does not display the correct distance. For instance, when the
>>> scalebar shows a distance of 20 miles, it measures only 13.8 miles. I
>>> know the measure tools are working correctly, so I assume this is a
>>> scalebar issue. Any thoughts on how to fix this?
>>>
>>> 2. I think this question was asked before, but I can't seem to
>>> find it on the e-mail list. With the measure tools, the cursor does not
>>> start measuring at the "crosshairs" when the user clicks, but rather in
>>> the NW quadrant of the crosshairs. Is there a way to change it so the
>>> measure start point will be on the crosshairs?
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>> ------------------------------------------------------------------------------
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>> _______________________________________________
>>> Geomoose-users mailing list
>>> Geomoose-users at lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/geomoose-users
>>
>> ------------------------------------------------------------------------------
>> _______________________________________________
>> Geomoose-users mailing list
>> Geomoose-users at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/geomoose-users
>>
>
>
More information about the Geomoose-users
mailing list