Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Degrees,minutes,seconds to decimal #62

Open
Citydampf opened this issue May 31, 2024 · 2 comments
Open

Degrees,minutes,seconds to decimal #62

Citydampf opened this issue May 31, 2024 · 2 comments

Comments

@Citydampf
Copy link

$pattern = '/(\d+)' . $secondsSymbol . '/u';

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
Copy link

krabina commented Jun 10, 2024

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
Copy link
Collaborator

gesinn-it-ilm commented Jun 12, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants