[OpenLayers-Users] OL 2.7 measure control questions

Zer zer_matt at hotmail.com
Thu Jan 15 17:27:03 EST 2009


Thanks!

Cross hair works great!

But the meter/kilometer thing is still a problem. Even though i use
'displaySystemUnits: {metric: ["m"]}', the control gives the result in km if
lenght is more than 1000 meters.


-Z


Tim Schaub wrote:
> 
> Zer wrote:
>> Dear list,
>> 
>> Is there a way to change to mouse pointer to a hair cross when using then
>> measure control?
>> 
> 
> control.events.on({
>      activate: function() {
>          map.div.style.cursor = "crosshair";
>      },
>      deactivate: function() {
>          map.div.style.cursor = "default";
>      }
> });
> 
> Of course you'll be better off if you use methods like:
> 
> OpenLayers.Element.addClass(map.div, "cursor_cross");
> 
> and
> 
> OpenLayers.Element.removeClass(map.div, "cursor_cross");
> 
> And then load up a stylesheet that has something like
> 
> .cursor_cross {
>      cursor: crosshair;
> }
> 
>> Is there a way to always present the measured distance in meters? The
>> distance shows in km as soon as a distance longer than 1000m is measured.
>> 
> 
> var control = new OpenLayers.Control.Measure(OpenLayers.Handler.Path, {
>      displaySystemUnits: {metric: ["m"]}
> });
> 
> This property (displaySystemUnits) is not marked as part of the API - so 
> you may have to change your app if it changes (don't imagine it will in 
> 2.x).
> 
> Tim
> 
>> Thanks,
>> 
>> Z
> 
> 
> -- 
> Tim Schaub
> OpenGeo - http://opengeo.org
> Expert service straight from the developers.
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
> 
> 

-- 
View this message in context: http://n2.nabble.com/OL-2.7-measure-control-questions-tp2159474p2165317.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.




More information about the Users mailing list