Content deleted Content added
Tacsipacsi (talk | contribs) →Add compatibility for use with wdqs within mapframe: reply, add link to Phabricator task |
→Map mismatch at mobile APP view: new section |
||
(15 intermediate revisions by 4 users not shown) | |||
Line 757:
:This looks like it would be an excellent addition, and would fill one of the gaps that the graph version used to offer. Not knowing how to use SPARQL, I have not managed to test anything yet. Do you have a working version anywhere? (Many thanks for engaging with my rustic LUA and finding the right place to add the query stuff!) [[User:RobinLeicester|RobinLeicester]] ([[User talk:RobinLeicester|talk]]) 12:21, 19 June 2025 (UTC)
::{{reply to|RobinLeicester|Seddon}} The examples are on the /doc page linked above. I’ve cleaned up the addition a bit to fix a bug (missing comma) and avoid manual escaping. (RobinLeicester, I suggest you to make more widespread use of [[mw:LUAREF#mw.text.jsonEncode|mw.text.jsonEncode()]]; I didn’t do so because I don’t know the module well enough to be able to test it.) —[[User:Tacsipacsi|Tacsipacsi]] ([[User talk:Tacsipacsi|talk]]) 12:45, 19 June 2025 (UTC)
:::Can not help at moment as I suspect the data you are loading is geojson (great) but I have almost always got this into OSM-maps (maplink) using the raw parameter as your solution only works I think with data that justifies an ID number like outline of a lake , river or political boundary or feature (and is available under a compatible license) but not the sort of thing I am interested in mapping like mountain peaks in a range, fault lines and geological formations which stores the data if not inline in [[Wikipedia:Map data]] pages.
:::If you gave me a raw parameter as used in {{T|Maplink}} or {{T|mapframe}} I could understand and do good things, with data already in Wikipedia:Map data which is compatible with Wikipedia's CC-BY-SA-3.0 licencing (e.g. as CC-BY licences) which are far less restrictive. [[User:ChaseKiwi|ChaseKiwi]] ([[User talk:ChaseKiwi|talk]]) 20:38, 20 June 2025 (UTC)
::::Great idea @[[User:ChaseKiwi|ChaseKiwi]]. I had not realised there was such a wealth of geoJson content out there. It can now be accessed (currently just in the sandbox module) using 'map-raw='. The main difference to its use on maplink is that it doesn't like the square brackets that you used for multiple items. They can still be strung together as comma-separated 'templates'. You can now see an example at the [[https://en.wikipedia.org/wiki/Template:OSM_Location_map/ModuleSandbox/doc moduleSandbox/doc]] page. I am not sure why it looks different to its use on [[Solomon Sea plate]], but you may be able to unravel that. [[User:RobinLeicester|RobinLeicester]] ([[User talk:RobinLeicester|talk]]) 18:42, 23 June 2025 (UTC)
:::::Looks exciting. Its probably just a processing issue now we are interacting with lua directly as those square brackets and commas are allowed json and the rendering of all the options with the Solomons plate logic is hopefully just due to the sandbox having a name I had not expected and default renders most things. I will try it out in the sandbox when time. [[User:ChaseKiwi|ChaseKiwi]] ([[User talk:ChaseKiwi|talk]]) 21:52, 23 June 2025 (UTC)
::::::See the sandbox for an example of the possibilities now we have separate raw functionality that can be used as well as all the old functionality. Some really high quality geology maps and abstractions that appeal to me have just become possible. [[User:ChaseKiwi|ChaseKiwi]] ([[User talk:ChaseKiwi|talk]]) 20:54, 24 June 2025 (UTC)
:::::::The map-raw= feature is now live and will hopefully show all your fabulous geology stuff. I was trying to find a way to include caption text on the fullscreen page, but it has defeated me. My method for providing the fullscreen link rules it out as they use the same 'text' parameter. All the other functionality, including multiple geojson templates should work. The square brackets issue is just because they are already included, to encompass other geoJson bits and pieces. I look forward to seeing some results. (Do you have a 'category' entry to show pages that are using the map data?) [[User:RobinLeicester|RobinLeicester]] ([[User talk:RobinLeicester|talk]]) 21:43, 24 June 2025 (UTC)
::::::::It might be worth dropping a note about all the recent changes on one of the village pumps, done some awesome stuff here and deserves to get used :D '''[[User:Seddon|Seddon]]''' <sup>[[User talk:Seddon|talk]]</sup> 21:59, 24 June 2025 (UTC)
::::::::I understand the feature with the automatic inclusion of inline square brackets before passed to the json parser. I do suggest you create a hidden category <code>OSM Location Map using raw Geojson</code> as this feature is not implemented in other module/template processing of Geojson in Wikipedia. [[User:ChaseKiwi|ChaseKiwi]] ([[User talk:ChaseKiwi|talk]]) 16:49, 5 July 2025 (UTC)
== Bug: incorrect marker position ==
Markers that are not exactly in the map center are offset from the correct position, and in some cases, the offset can be quite large. In the two examples below, a marker with exactly the same coordinate parameter value is displayed more than 10 km from the correct position. The direction of the offset depends on the marker's position relative to the map center. In both cases, when opening the map in full screen, the marker is displayed at the correct position.
{{OSM Location map
|coord = {{coord|-52.8|-71.3}}
|zoom = 7
|width = 800
|height = 800
|float = centre
|label = Ushuaia
|mark-coord = {{coord|-54.801944|-68.303056}}
|mark-title = Ushuaia
|mark-size = 5
}}
{{clear}}
{{OSM Location map
|coord = {{coord|-56.8|-65.3}}
|zoom = 7
|width = 800
|height = 800
|float = centre
|label = Ushuaia
|mark-coord = {{coord|-54.801944|-68.303056}}
|mark-title = Ushuaia
|mark-size = 5
}}
{{clear}} [[User:Ftrebien|Fernando Trebien]] ([[User talk:Ftrebien|talk]]) 04:27, 6 August 2025 (UTC)
: Great troubleshooting, and it turns out there is an embarrassing solution. I solved this issue in the first rewrite ... but didn't notice my 'correction factor' had assumed a positive latitude value - disgraceful case of northernism which you (and {{U|ChaseKiwi}}) will be right to condemn! At present the solution (math.abs) is only on the sandbox. I will have a look around for any potential unwanted outcomes, but am hopeful it should only improve rather than break things, so expect to implement in due course.
: Only dots on the edges of the map, at close-to-polar latitudes will show much difference. As to why it needs a correction, I don't know. The values used were derived by trial and error, and your examples show that there is still scope for a slight improvement, which I will take the opportunity to have a look at. [[User:RobinLeicester|RobinLeicester]] ([[User talk:RobinLeicester|talk]]) 22:33, 6 August 2025 (UTC)
::{{reply to|RobinLeicester}} {{Thank}} a lot for fixing it so quickly! --[[User:Ftrebien|Fernando Trebien]] ([[User talk:Ftrebien|talk]]) 22:55, 9 August 2025 (UTC)
:::{{tick}} I was unable to find any unwanted outcomes, so have gone live with the correction. Thanks for reporting. [[User:RobinLeicester|RobinLeicester]] ([[User talk:RobinLeicester|talk]]) 15:51, 11 August 2025 (UTC)
::::Yes appreciated. At 45 degrees south which is southern NZ it was only a couple of pixels out so minor repositioning of some Arc labels will be done for ideal map clarity. [[User:ChaseKiwi|ChaseKiwi]] ([[User talk:ChaseKiwi|talk]]) 08:50, 12 August 2025 (UTC)
== Map mismatch at mobile APP view ==
I have noticed that the mobile app view has a fixed width, so the labels, points or whatever there is in the map is not shown in the correct position, but relative to the position it should have if the map had the original width. [[User:Theklan|Theklan]] ([[User talk:Theklan|talk]]) 07:25, 25 August 2025 (UTC)
|