Hi All, Hi armin.

I find a bug for locale traslation:

$_sl['digitize_help'] = 'Doppio click per finire
misura/digitalizzazione.<br /> Cancell l\'ultimo punto con il tasto
«CANC».';

It's lost a letter 'a' in 'Cancella'

I upgrade for my appplication the measure tools putting in the form the
units of measure:

for that I move

// // ADAPT FACTOR FOR DISTANCE/AREA CALCULATION
// // eg. 1000 for km, 1 for m
// var calcFact = 1000;

from in pmdraw.js to the start of mapserver.js

and here I put this new variable:

var unitMeasure = '';

if (calcFact == 1000){
    unitMeasure = 'km';
}

if (calcFact == 1){
    unitMeasure = 'm';
}

and I add the ne variable to function createMeasureInput():

function createMeasureInput() {
    var mStr =  '<form name="measureForm"><table
class="TOOLFRAME"><tr><td NOWRAP>' + localeList['Total'] +
'</td><td><input type=text size=9 name="sumLen"></td><td>'+ unitMeasure
+ '</td>';
    mStr += '<td id="mSegTxt" value="&nbsp;&nbsp;' +
localeList['Segment'] + '" NOWRAP>&nbsp;&nbsp;' + localeList['Segment']
+ '</td><td><input type=text size=9 name="segLen"></td><td
id="mSegUnit">'+ unitMeasure + '</td>';
    mStr += '<td width=130 class="TDAR"><input type="button"
id="cbut_measure" value="' + localeList['Clear'];
    //mStr += '"  class="button_off" 
onClick="javascript:clearMeasure()" onmouseover="changeButtonClr(this,
\'over\')" onmouseout="changeButtonClr (this, \'out\')" >';
    mStr += '"  class="button_off"  name="custombutton"
onClick="javascript:clearMeasure()" >';
    mStr += '</td></tr></table></form>';
   
    $('#mapToolArea').html(mStr);
    pmCButton_init('cbut_measure');
    showHelpMessage(localeList['digitize_help']);
}

after i mdify the function onDigitizedPolygon() in pmdraw.js:

function onDigitizedPolygon(poly){
   
    var polyGEO = toGeoPolygon(poly);
    var perimGEO = polyGEO.getPerimeter()/calcFact;   
   
    var cntPerLen = Math.round(perimGEO).toString().length;
    numSize = Math.max(0, (4 - cntPerLen));
   
    perimGEO = roundN(perimGEO, numSize);
   
    var areaGEO = Math.abs(roundN (polyGEO.getArea() / (calcFact *
calcFact), numSize-1)) ;
               
    // Change input text box to 'Area'
    document.measureForm.sumLen.value = perimGEO;
    document.getElementById("mSegTxt").innerHTML = localeList['Area'];
    document.getElementById("mSegUnit").innerHTML = unitMeasure+'q';
   
    document.measureForm.segLen.value = areaGEO;
   
}

and for update the clear button I add another line in function
resetMeasure() of pmdraw.js:

function resetMeasure() {
    // remove lines
    polyline.reset();
    jg.clear();   
    jg_tmp.clear();
    document.getElementById("mSegUnit").innerHTML = unitMeasure;
    reloadData();
}

I think that for new version of pmapper is neccessary the units of measure
in the measure tool

so this can help you armin?  what do you think about?

bye
Walter

-- 
Please no  .doc, .xls, .ppt, .dwg:
https://www.faunalia.it/dokuwiki/doku.php?id=public:OpenFormats

Walter Lorenzetti
email+jabber: [EMAIL PROTECTED]
www.faunalia.it
Cell: (+39) 347-6597931  Tel+Fax: (+39) 0587-213742
Piazza Garibaldi 5 - 56025 Pontedera (PI), Italy


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
pmapper-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pmapper-users

Reply via email to