mod_measure.php
Christoph Ratke
ratke at geoinformationsdienst.de
Tue May 2 05:15:28 EDT 2006
Hi develeopers,
I have some simple proposals for changes in the measuring module
(../javascripts/mod_measure.php):
- When resizing the map frame with a tool like selectMapSize or
dragMapSize in measure mode the linePoints between base points are not
painted outside the original frame extent.
-> in mod_measure.php, function evaluateDashes(x1,y1,x2,y2,count) in the
for loop the if condition if(x >= 0 && x <= mod_measure_width && y >= 0
&& y <= mod_measure_height) can be removed without trouble to solve this
problem. If that is Another solution could be to dynamically change the
vars "mod_measure_height" and "mod_measure_width" but I saw no need for
this.
- In measure mode the cursor-style should be changed like this:
in mod_measure.php, function mod_measure_go(), add the following:
-- snip --
function mod_measure_go() {
var el = window.frames[mod_measure_target].document;
// add this line to change the cursor style to signal measuring
el.body.style.cursor = "crossHair"; // or some other style
// this line added
-- snap --
in function mod_measure_disable() it's the same to change the style back
to usual:
-- snip --
function mod_measure_disable() {
var el = window.frames[mod_measure_target].document;
// add this line to change cursor style back to usual
el.body.style.cursor = "auto";
-- snap --
You could do the same in the pan mode in ../javascripts/mod_pan.php:
-- snip --
function mod_pan_click(){
var el = window.frames[mod_pan_target].document;
// changed cursor style to signal panning
el.body.style.cursor = "move";
...
-- snap --
and
-- snip --
// cursor style back to usual
function mod_pan_disable(){
var el = window.frames[mod_pan_target].document;
// change cursor style back to usual
el.body.style.cursor = "auto";
...
-- snap --
I hope this was something useful
regards,
Christoph
--
Christoph Ratke
GeoInformationsDienst GmbH
Götzenbreite 10
37124 Rosdorf
fon: ++49-(0)551-78904-25
mobile: ++49-(0)160-2735623
eMail: ratke at geoinformationsdienst.de
web: www.geoinformationsdienst.de
More information about the Mapbender_dev
mailing list