gesinn-it-pub / mediawiki-extensions-PageForms

Fork of MediaWiki extension PageForms that aims to simplify contribution through hosting on GitHub instead of Gerrit, improved quality through better test coverage (to be done) and continuous integration.
Other
1 stars 4 forks source link

Degrees,minutes,seconds to decimal #62

Open Citydampf opened 3 months ago

Citydampf commented 3 months ago

https://github.com/gesinn-it-pub/mediawiki-extensions-PageForms/blob/3b1bb668b10a9c09608d052ed987040707c75cfd/includes/forminputs/PF_OpenLayersInput.php#L234

calculation for seconds is not using right search pattern for decimal numbes like 21.45 (function returns 45) so use $pattern = '/([\d.]+)' . $secondsSymbol . '/u';

krabina commented 3 months ago

you can try our latest master https://github.com/Knowledge-Wiki/mediawiki-extensions-PageForms and if it fixes the problem as you suggested, please comment here.

gesinn-it-ilm commented 3 months ago

Could you @Citydampf please put here use case you used in order to reproduce the issue. Which format did you use to write coordinates?

If we use format like this for example 45.33445, 19.98876 the input field will accept it and the map will be automatically updated. For this way of writing coordinates it will not jump into the coordinatePartToNumber() function which has this $pattern = '/(\d+)' . $secondsSymbol . '/u'; inside.

richtig

It will only trigger that function if coordinates have string inside, like N or S, for latitude.