[OpenLayers-Users] measure control...

Arnd Wippermann arnd.wippermann at web.de
Thu Feb 21 15:18:40 PST 2013


Hi,
 
folks who use OpenLayer looks at their code, if it's all right.
 
Instead of diplaySystem you should use displaySystem and you get what you
want.
 
You add also 2 times the measureControl to your map.
 
    mapOptions.controls = measureControls;
    ...
    map.addControl(measureTool);

One is enough.
 
OpenLayers is a powerful javascript library to build complex web map
applications. 
It's easy to use, but it's also easy to fall in ones own trap.
 
Good luck with OL
Arnd
 
  _____  

Von: openlayers-users-bounces at lists.osgeo.org
[mailto:openlayers-users-bounces at lists.osgeo.org] Im Auftrag von Sean K
Gesendet: Donnerstag, 21. Februar 2013 23:13
An: Gery .
Cc: openlayers-users at lists.osgeo.org
Betreff: Re: [OpenLayers-Users] measure control...


do you mean that the layer in geoserver controls the measure tool in
OpenLayers?


So if the layer in geoserver is UTM -- the measurement tool cannot generate
miles ? 


What do folks do to make this work as a general solution -- regardless of
the projection in the layer?  Do folks who use OpenLayer have to look at the
measurement event.units and convert on the OpenLayer javascript side?





On Thu, Feb 21, 2013 at 2:01 PM, Gery . <gamejihou at hotmail.com> wrote:



probably because your base map has utm values, check the projection of your
layer.


____________________________________________________________________________
______________
Piensa en el medio ambiente - mantenlo en la pantalla. NO lo imprimas si NO
es necesario.
Think green - keep it on the screen. Do NOT print if it is NOT necessary.
Denken Sie an die Umwelt - bewahren Sie es auf dem Bildschirm. Drucken Sie
es NICHT, wenn es NICHT notwendig ist.



> Date: Thu, 21 Feb 2013 13:57:53 -0800
> From: sk92129 at gmail.com
> To: openlayers-users at lists.osgeo.org
> Subject: Re: [OpenLayers-Users] measure control... 

> 
> I still dont get miles units -- mine still comes out as KM.
> 
> Here is my measure tool .
> 
> 
> measure.html
> <http://osgeo-org.1560.n6.nabble.com/file/n5036001/measure.html> 
> 
> Why is it still KM?
> 
> 
> 
> --
> View this message in context:
http://osgeo-org.1560.n6.nabble.com/measure-control-tp3942722p5036001.html
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users





-- 
Sean

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20130222/1813cb80/attachment-0001.html>


More information about the Users mailing list