Jump to content

Template talk:Cyclone map

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Proposal for map for cyclone tracks

[edit]

Hello. I want to propose a blanket change to Wikipedia:WikiProject Tropical cyclones on how cyclone track maps are made, stored, and used. But before I do so, I want to clarify if this is in fact possible based on available features.

Looking at this Wikidata sandbox (consider this a Wikidata item for a given storm within the IMD region), you will notice that there are 6 coordinates with series ordinal (P1545) set for each tracking interval. instance of (P31) are also set for each of those coordinates, which corresponds to the IMD tropical cyclone scales at each point (a more appropriate property could be decided later).

Based on this data, is it possible to use the Qid (Q15397819 in this case) to generate an image that shows:

  1. The path of the storm from point 1 through 6
  2. The intensity of the storm at each point (with different point icons/colours rendered based on P31)
  3. While being able to use other features of Mapframe, such as zoom, geomask, etc.

And considering we can currently enter multiple QIDs for one mapframe (example), this would also allow us to plot multiple storms in one image. Is such an arrangement possible with currently available features? Or is something similar possible with Mapframe, without having to manually create these raster images of tracks? Rehman 09:05, 19 May 2020 (UTC)[reply]

Interesting idea. I think right now we lack the ability to automatically create lines that link points, and we're limited to a small set of icons. Perhaps consider {{OSM Location map}}? You can create overlay lines, like in the Leicester Castle example there. ɱ (talk) 16:29, 19 May 2020 (UTC)[reply]
Do you think this is a Lua limitation? Or something the site cannot support yet? I wouldn't mind cross-posting at VPT to see if anyone is willing to code... Rehman 17:13, 19 May 2020 (UTC)[reply]
No idea, I only use maplink and know its current limitations. ɱ (talk) 17:24, 19 May 2020 (UTC)[reply]
Kartographer only supports getting polygons from Wikidata, not points or lines. It is possible to do what you want with Lua though, but that's outside by abilities. --AntiCompositeNumber (talk) 04:38, 20 May 2020 (UTC)[reply]
Map
The example here uses <mapframe> to draw lines between the set of coordinates, which are inserted manually. I've drawn lines between all five coordinates and added a symbol to the last for illustration.
So what is wanted is to get the collection of coordinates from Wikidata and generate the map with <mapframe> automatically. This can be done with Lua.
What would be wanted? Lines, symbols, or both? —  Jts1882 | talk  07:39, 20 May 2020 (UTC)[reply]
Map
I already have a module that creates maps for a list of football stadium names using template {{football map}}. Fortunately it can't tell the difference between a football stadium and a hurricane and can be used to demo what might be possible. The example uses the following code for Hurricane Patricia:
{{Football map |stadium1=Hurricane Patricia |zoom=1}}
The point coordinates, a single set in this case, are retrieved from Wikidata and <mapframe> used to generate map. Note also that clicking the symbol produces a popup with the an image of the cyclone, which also comes from Wikidata.
A {{cyclone map}} could be created along the same lines. Given a list of cyclone names or wikidata ids it could retrieve the coordinate data from wikidata and plot the path for each cyclone. The series ordinal (P1545) and storm type can also be retrieved. The latter can be used to set the colour of the line or symbol. Additional information such as date and wind speed could also be added to the popup. —  Jts1882 | talk  08:27, 20 May 2020 (UTC)[reply]
Thanks for the detailed reply, Jts1882. Do you think it is possible to match the design of the current cyclone track maps? If so, I'm sure this would be widely used, especially with the added features (such as clicking points for further data). Would you be able to create the module as a start? I'd start it myself, but my Lua skills are next to none. Rehman 14:30, 20 May 2020 (UTC)[reply]
I think something with similar could be generated. There is a limit on what can be used for marker symbols, but circles can be added as zero-length lines (see modification above). There is also the limit of only having the street map, so the geographical maps are not an option.
I've being reacquainting myself with my code (yikes!!) and I think I have all the elements. I have code to get the wikidata information and to create the json for mapframe, so I think can put something together as a demo. —  Jts1882 | talk  15:10, 20 May 2020 (UTC)[reply]
Brilliant! I think the street maps wont be an issue, as most/all the time, the maps are well zoomed out. Once we get the demo, I'll post at the cyclone wikiproject, and get some comments from there. Hopefully this will stop all those manually made and manually updated raster images. Looking forward to the demo :) Btw, not too sure if it's some caching issue from my end, but I can only see the modification you made in preview. I don't see the circles in normal reading mode. Rehman 16:27, 20 May 2020 (UTC)[reply]
No, not just you. I hadn't noticed that the large circles disappeared in the static map. This is unfortunate, as the markers give a different look. Anyway, I'll put something to together and we can get some feedback. —  Jts1882 | talk  17:25, 20 May 2020 (UTC)[reply]
Map
Test Map
  • This is an interesting subject and I started looking at it a few days ago. (Day late and a dollar short) I thought maybe something like the map I created as a sample using information from wikidata using Lua. More information can be added by adding descriptions etc.
  • The Point information was created by going through the P265 claims arrays containing the latitude and longitude. The LineString was created using the same latitude and longitude info. Markers could be used with or without icons. Different colors could be used based on instance P31? The LineString can be any color, width etc.
  • Instead of markers circular polygons/other shapes/zero length lines (with large stroke-width etc. can also be used. Again different colors can be used.
  • Basically you all have this well in hand so best wishes -- Matroc (talk) 03:19, 21 May 2020 (UTC)[reply]
I like the broad opaque lines to show the path. There are lots of options on how to show these cyclone maps. —  Jts1882 | talk  07:14, 21 May 2020 (UTC)[reply]

Template {{Cyclone map}}

[edit]

I have created a {{Cyclone map}} template that uses a modified version of Module:Football map. Here is an example:

Map
{{Cyclone map|mode=marker
|width=370 |height=270 |align=right
|latitude=15 |longitude=80.5 |zoom=4 
|name2=Hurricane Patricia
|id1=Q15397819
}}
  • The |width=, |height= and |align= parameters determine the size and position of the map.
  • The |latitude=, |longitude= and |zoom= parameters set the centre coordinates for the map and its zoom level.
  • :* The |name= and |id= parameters indicate the cyclones to show using data from Wikidata.
    • |name= must be an exact Wikipedia article title with a corresponding Wikidata entity. The example Hurricane Patricia is outside the boundaries of the map, but can be seen you zoom out.
    • |id= is a Wikidata entity, in this case Wikidata sandbox 3, an example with coordinates for the path of a cyclone.
    • The map can show dozens of storms. If mixing names and Wikidata ids use separate indices.
  • The coordinates and other properties are retrieved from Wikidata with Lua. The colours are determined by the type of storm (depression, Cyclone storm, etc).
  • There are a number of other parameters inherited from and described in {{football map}}, including a properties of the marker symbols (icon, colour, size) and a |geoshape= parameter for adding shapes and masks.
This example is meant to demonstrate how the map could appear. The colours for both symbol and lines are clearly over the top. The broad opaque path in Matroc's example is a nice alternative. Suggestions welcome. —  Jts1882 | talk  07:14, 21 May 2020 (UTC)[reply]
Pretty much things that I had thought of were mentioned... Not sure if mapshapes of countries or markers of major cities in the area of the cyclonic activity would be useful or readily accessible. Description field of course can be used for any image and or added information. I also agree that other storms can be plotted on the same mapframe (time frame limited); however, 1 thing at a time maybe. For now "Well done" and "Best wishes" -- Cheers! -- Matroc (talk) 02:57, 22 May 2020 (UTC)[reply]
Map
Here is the template version of Matroc's map (with reduced canvas).
{{Cyclone map |mode=marker
|width=370 |height=270 |align=right
|latitude=15 |longitude=80.5 |zoom=4 
|marker-color1=#bbccff  |marker-symbol1=-number
|stroke-width1=50 |stroke1=#D3D3D3 |stroke-opacity1=0.7 
|id1=Q15397819
}}
  • |marker-symbol=-number sets the marker symbol to an incrementing number (this should match the series ordinal on Wikidata)
  • |marker-colorl=#bbccff sets the color of the marker symbol to a pale blue. The default is to let the storm type set the colour (e.g. severe cyclone storm = red)
  • |stroke1=, |stroke-width1= and |stroke-opacity1= set the properties of the line between each point in the storm path, respectively the line colour, line width and line opacity. The default is to let the storm type set the line colour.
  • In general, an index at the end of the parameter name sets the properties for the storm with that index. Without an index number the property is set for all storms listed, unless overridden with a indexed parameter. In the examples, with a single storm, there is not difference.
Both the lua coded map (the template version, right) and the map coded with the <mapframe> tag look different in preview mode. The line gets a rounded margin in preview, but the line ends are straight on the saved page. —  Jts1882 | talk  12:05, 22 May 2020 (UTC)[reply]
Thank you, Jts1882. This is great start! There are some known bugs with Kartographer; the different behaviour in preview vs live is one of them. Some feedback:
  • I've changed the coords to be more far apart (more realistic) so we could assess the output better.
  • While the thick-transparent lines are nice, the behaviour at different zoom levels could be problematic. For instance, a zoomed out version with the current thick borders, just show a bunch of polygons bunched up together. This would be a particular issue with cyclones with shorter tracks. I think lines on the thinner range would be ideal for wider scenarios, but that being said, Matroc's "Test Map" seems to be handling the polygons in a smoother way. Maybe we could base on that, and simply halve the thickness? Worst case, we can simply stick to a 1px solid black line.
  • It seems like whatever icon we choose, it will still be placed within the 3D placemark symbol. Would anyone know if there is a way to override this? It would be nice if we can simply have a colour-coded 2D circle/spot for each placemark.
  • On a separate note, while this isn't important, would anyone know if it is be possible to change the colour theme used in the map itself? To match to something close to current maps? Or maybe at least select another OSM layer?
Maybe it is time we move Module:Football map/cyclone to Module:Cyclones tracks, and start on the live version? Thank you! Rehman 12:25, 23 May 2020 (UTC)[reply]
A few brief answers.
  • I've modified the examples above for the new data. Have you thought of adding the times to each coordinate item?
  • The different static/dynamic map appearances are a real nuisance. Unfortunately its a performance issue and unlikely to change. However, Matroc's map uses one polyline to draw the path, whereas I used lines for each pair so I could change the line colour. This can be changed so that it uses the single line when the path is all one colour.
  • Yes, the icons are very limited and all have the markers. I've been experimenting with circles and polygons, which work nicely in preview but not on the page (see the third example at {{cyclone map}} in preview or expanded mode).
    • I've just chose the colours for the storm types on wikidata to make them obviously different. There is a separate function handling these colours so it's easy to edit them to whatever colour code desired.
    • The symbols should be straightforward too.
  • As far as I know Kartographer only supports the one background map. Is that layer a new thing on OSM? That would be a big step forward if it could be incorporated, but is seems development of Kartographer is low on the WMF agenda.
Yes, it might be a good time to move the module and possibly copy this discussion over to the template or module talk page. Do you prefer {{Cyclone tracks}} to {{Cyclone map}}? —  Jts1882 | talk  13:17, 23 May 2020 (UTC)[reply]
Thanks Jts1882. By adding times, you mean as part of this maps function? If not, I guess the cyclone project members could decide what else to include. It would probably be a separate ontology project at Wikidata. I look forward to the updated code. I don't have a naming preference, though maps do sound better. Feel free to move the discussion as well. Will update regarding the QIDs on the new talkpage. Cheers, Rehman 13:38, 23 May 2020 (UTC)[reply]
I was think of adding the times to the wikidata for each coordinate item, so we have date/time, series ordinal and storm type (via P31). Then the popup can have time, coordinates and storm type (the latter is currently included). —  Jts1882 | talk  16:39, 23 May 2020 (UTC)[reply]
Yes, that would make sense. Actually, this way we could scrap the series ordinal. The sequence could be determined based on the date/time. What do you think? Rehman 03:25, 24 May 2020 (UTC)[reply]
Agree, that is probably the best approach. The series ordinal is necessary for the code at the moment, but that should be changed. I added point in time (P585) qualifiers to the wikidata sandbox, but for some reason it only allows the date (with 00:00 for the time). While this will do for testing, a precise time stamp for the measurement would be better.
The storm colours now should match the colours in Tropical_cyclone_scales#Comparisons_across_basins. That Typhoon colour is out of place. All the names in the table are included. "Tropical Disturbance" uses the MF Indian ocean column colour rather than the Australian one. —  Jts1882 | talk  14:44, 24 May 2020 (UTC)[reply]

Break

[edit]

Hi Jts1882. Sorry for the delay in replying. Got stuck with some other work, and was also preparing these Wikidata items - to be used as instance of (P31) for individual storms. Would you be able to integrate those QIDs, such that if they are used as P31, the line colour would change accordingly (to the respective table cell colour)?

Since current cyclone track maps have placemarks very close to each other, and considering how "bulky" the Kartographer markers are currently (and the inability to switch the 3D marker off), I think the most practical/least messy approach at the moment would be to use lines (and no placemarks). But that would mean giving up on the shape information (triangle for extratropical cyclone (Q1063457), square for subtropical cyclone (Q2331851)); which is not a good way to go, and editors would probably not accept this.

What do you think of manually overlaying those shapes at the start of each line segment (not as placemarks, but as overlay shapes)? Does that make sense, or is it too complex? Do you think there's a better way around this problem? Matroc? Rehman 13:23, 6 June 2020 (UTC)[reply]

Map
The colours for different storm descriptions should already map the template colours (see last comment before the break). It checks the names rather than the wikidata ids. If you change the storm type on Wikidata, the colours of the lines should change in the test version (i.e. with |mode=test) of the map.
One option is to use the lines and place the marker only on the first point. The example to the right uses wikidata to determine line colour and shows the marker sympbol with a square (this can be automated to storm type). The circles currently show on each point of the path in edit preview and when the map is expanded, but that can be removed. —  Jts1882 | talk  13:58, 6 June 2020 (UTC)[reply]

Map
Test Map
  • Bulky pointer (markers on map) - There are 3 sizes of markers - "small, medium and large" - Even with use of small there isn't much difference - They may still overlap each other depending on zoom level.
  • Line colour change is fine as is one marker to start the track if so desired.
  • I added a mapframe test with various shapes that act like pointers (can add pictures, descriptions, colors etc.). These were created using a Module I wrote circa 2017. I thought this is what was meant as an overlay shape???
  • Hope this is of some help! -- Matroc (talk) 04:46, 10 June 2020 (UTC)[reply]
Map
@Matroc: Yes, that is very helpful. I had played with the polygon in one of my test options, but I didn't like the behaviour. Now I see the reason. I was using a larger stroke-width which stays the same regardless of zoom and gives rounded edges to the shapes. You used a stroke-width of 1 which gives cleaner shapes that change size with the zoom. That is much better.
The map to the right (below yours) is an example using a square. I don't like the circle shape (not clean at all zooms), but the square, triangle, and star give crisp shapes and inverse triangle and diamond should as well. I will add an overlaid symbol feature with shape, color and size properties.
@Jts1882: The circle I used is a multisided figure with a limited number of sides (40 which accounts for the zoom effect for the circle not being cleaner - probably can attain a better shape using 100 or so more) I am going to replace that with a circle shape which is large [360] positions and would appear better though probably at a higher processing cost. -- Matroc (talk) 19:04, 10 June 2020 (UTC)[reply]
As an extra (not for the fainthearted) - I put a sunburst shape on the map that has links to various positions on my map - One can also add such links to markers or shapes in order to traverse the map (I will illustrate that on Position 3 (square). This was an idea I came up with on wikivoyage while conversing with Yurik several years ago. There are several caveats (gotchas) in order to accomplish this type of thing... I came back and corrected a few issues but you can get the picture. This may be useful in another project. Cheers! -- Matroc (talk) 21:42, 10 June 2020 (UTC)[reply]
There is one difference with the popups on these overlaid shape symbols in that the popups don't close properly like they do with the marker symbols. —  Jts1882 | talk  14:14, 10 June 2020 (UTC)[reply]
Added a new set of parameters to handle the overlay symbols.
  • |symbol-size= – the size of the symbol (default: 0.4). The size is the radius of the symbol in degrees of latitude/longitude. It might be better use sizes 1, 2, ... N and scale it appropriately.
  • |symbol-shape= – the shape of the symbol (default: TBA). Current options are square, triangle, inverted triangle, diamond and star. I've not added the circle for performance reasons (see above), but this is not a final decision.
  • |symbol-stroke= – the colour of the border of the symbol (default: dark blue, but perhaps should be auto for storm colour)
  • |symbol-stroke-width= – the width of the border of the symbol (default: 1)
  • |symbol-stroke-opacity= – the opacity of the border colour of the symbol (default: 1)
  • |symbol-fill= – the fill colour of the symbol (default: auto for storm colour)
  • |symbol-fill-opacity= – the opacity of the fill colour of the symbol (default: 1)
As with all other appearance paramters, these parameters can be indexed (just affect one storm) or global.
@Matroc and Rehman: Any suggestions/comments/etc? —  Jts1882 | talk  17:08, 11 June 2020 (UTC)[reply]
  • @Jts1882 and Rehman: For the cyclone map I would think a limited number of sizes scaled accordingly with a default size would be easier for users to implement... Limited because I wouldn't want a shape to cover a continent (exaggeration) on the cyclone map. (though unlimited size of shapes would be for appropriate for another module) -- 20:01, 11 June 2020 (UTC)[reply]
  • Star symbol is slightly different from mine but nice looking. If not a full circle, I think a multi-sided shape (100 positions or so) would work. -- Matroc (talk) 20:01, 11 June 2020 (UTC)[reply]
  • When I make shapes in my modules, I use another option which may be useful - type - values are: poly, or line. (poly as default). poly is for a filled polygon shape and line which is an outline (LineSring) of a shape. Use of these types can produce some interesting results. -- Matroc (talk) 20:01, 11 June 2020 (UTC)[reply]
  • Another parameter I have implemented is direction for certain shapes - My triangle shape for example uses this option - (1-8) to make it inverted or point towards a different direction. Overlay a triangle and an inverted triangle and you have six pointed star. (Also used for making wedges, arrows etc. point in different directions). -- Matroc (talk) 20:01, 11 June 2020 (UTC)[reply]
  • Colors and widths proposed are fine. -- Matroc (talk) 20:01, 11 June 2020 (UTC)[reply]
  • I also have a tendency to format my latitudes and longitudes to 6 numbers right of the decimal point when drawing the shape coordinates. (my quirky thing) -- Matroc (talk) 20:01, 11 June 2020 (UTC)[reply]
  • Be aware that larger shapes such as circles higher above and lower than the equator become distorted as they progress further North or South because of the Mercator map projection. I overcame this problem and can provide solution if you ever need it. Also, I can provide any of my non-professional iterative code snippets of shapes etc. (mostly from 2016) if wanted. Note: on wikivoyage we have a different version of Kartographer that implements group and show allowing for multiple maplinks and other options (If interested I can provide a page link or two). I am not used to putting everything in a single mapframe - Just to let you know where I am coming from. I apologize for my wordiness ramblings and only hope to contribute in this endeavor. Cheers and best wishes! -- Matroc (talk) 20:01, 11 June 2020 (UTC)[reply]
Please continue as wordily as you want. These explanations are very useful and hlped me get the shapes are now working. I think my initial attempt was unsuccessful because I was switching between polygon and linestring and not optimising the parameters properly. The circle works best without a stroke-width.
My wonky star was done purely by eye. Now I've added maths functions for the circle I can create a more symmetrical version.
I think rounding the numbers is a good idea, especially if using large polygons to draw circles. The math functions can leave very high precision numbers which can add up if using a lot of shapes.
I would be interested in having a look at your code and pages. Hopefully a Mercator correction isn't needed here, but its always interesting to know how to solve such problems. —  Jts1882 | talk  16:02, 12 June 2020 (UTC)[reply]
  • Recalculate latitude if >10.5 or <-10.5 (distortion of circles near equator is minimal and recalculation not needed) local function newlat(a) newlatitude = 180/math.pi * (2 * math.atan(math.exp( a * math.pi/180)) - math.pi/2 ) return newlatitude end -- Matroc (talk) 01:48, 15 June 2020 (UTC)[reply]
Thanks. —  Jts1882 | talk  06:38, 15 June 2020 (UTC)[reply]

Break 2

[edit]

@Jts1882 and Matroc:. Great steps forward, thank you for the hard work guys. A few non-technical comments (some of which I mentioned earlier):

  • Priority should be given to make the default output look as close as to the current theme. Otherwise there is a high tendency that this may not be implemented as norm.
  • While the default connecting line can support different widths/colours, can we have the default as a 1px black line?
  • The default shape to also be a circle
  • The default shape outline to be none
  • And some notes for the points of the cyclone's track (taking Wikidata Sandbox 3 (Q15397819) as an example):
  • The module should fetch the articles's QID by default. In instances the track is to be displayed on another page, a QID= parameter should be implemented to manually assign a QID.
  • The QID parameter should be able to support csv with multiple QIDs, in order to display more than one cyclone track within the mapframe

Thoughts welcome. Cheers, Rehman 12:25, 12 June 2020 (UTC)[reply]

Map
I've added a new example with values set to what I understand you want as the defaults. Once we have this working correctly I can set them as defaults.
  • I've used a diamond as the circle isn't implemented yet. [TODO: implement circle.  Done as 120 sided polygon]
  • I've fixed the error for missing series ordinal. It currently uses the order they are listed. [TODO: sort on point in time.  Done checked with new first point added to end of list of coordinates]
  • The popup currently has latitude and longitude. What should it display: time, storm intensity, coordinates?
  • Symbol colours should already follow this QID table (the check is on the name, e.g. "severe tropical cyclone" rather than the QID).
  • For the non-tropical cyclones, I assume the P31 would be one of the main statements, rather than an identifier on the coordinates. I've added Q1063457 to the sandbox example. If this is not what you intend, can you set up a test example with a P31 qualifier set to extratropical cyclone (Q1063457) or subtropical cyclone (Q2331851) so I can have something to test?
Further thoughts? —  Jts1882 | talk  13:19, 12 June 2020 (UTC)[reply]
Thanks for the speedy reply, Jts1882.
  • For the popup, it would be nice if the timestamp, storm type (the QID label), and full coordinates are displayed for now.
  • For the symbol colours, would it be possible to change the check to the QID, since the labels could change (example: tropical disturbance (Q96052470))?
  • Regarding P31 for triangle/square, I'm trying to figure out how to map situations like these. I think the most practical way would be to include the P31 value as a qualifier. What do you think?
--Rehman 13:41, 12 June 2020 (UTC)[reply]
OK, with you now on the storm types. They can change from subtropical to tropical as they move. So this means that some coordinate values would have two different P31 values, one for subtropical/tropical/extratropical cyclone and one for intensity (depression/severe tropical cyclone/etc). —  Jts1882 | talk  14:16, 12 June 2020 (UTC)[reply]
Correct. I'm not a fan of having two P31 qualifiers either. But I'm not too sure how else to map this data. Rehman 14:19, 12 June 2020 (UTC)[reply]
I've added an extra point with a second instance of qualifier for subtropical storm. The symbol now changes. —  Jts1882 | talk  14:45, 12 June 2020 (UTC)[reply]
Nice, thank you. I've also spot a sort-of-bug on the rendered map to the right. The shapes' orientation seems to be in relation to the path. So depending on the path's angle, a square could even look like a diamond. Would it be possible to align all the shapes to the latitude like this? Rehman 15:15, 12 June 2020 (UTC)[reply]
Ok that's strange. I though I saw the square on the map tilted, but it seems to be fine now. Rehman 15:17, 12 June 2020 (UTC)[reply]
I think you probably caught an intermediate change I made. It was showing diamonds briefly. I've now put a 120-sided polygon in for the circle. Resolution can be increased, if needed. —  Jts1882 | talk  15:25, 12 June 2020 (UTC)[reply]
Oh ok. Thank you, Jts1882. I'm calling it a night here. I'll do a more thorough test over the weekend, and update here again. Cheers, Rehman 15:42, 12 June 2020 (UTC)[reply]
All appears to be coming together quite well... I don't have anything else to add at this time... Cheers! -- Matroc (talk) 19:10, 12 June 2020 (UTC)[reply]

Jts1882, thanks for the above. I did more tests, and it seems like we're almost there. To reduce the code used in articles (and errors when one or more parameters are omitted), can I suggest some more defaults?

  • Default width to be 220px
  • Default height to be based on 4:3 aspect ratio (based on width), or 165px.
  • Default alignment to be right
  • Default shape to be circle ("cyclone" is very cool, but more points closer (which happens often) would make it look cluttered)
  • Default stroke width to be 1
  • Default stroke colour to be #000000 (black)
  • Is it possible to automate the zoom function as {{Mapframe}} does? So that it basically shows a zoomed out version of all points.
  • And as the zoom, can we forgo the latitude and longitude parameters?
  • And finally, can we make the mode=test2 as the default, so that we don't have to state that parameter for the more common uses.

Thoughts welcome. Rehman 13:51, 25 June 2020 (UTC)[reply]

Map
The option |mode=test2 was intended as the version for working out the defaults. I've kept it as an option while working through the details as I don't want to break the discussion above. When it becomes the default, some of the maps above will change and the discussion won't make sense. But I agree it's almost time.
I've removed the defaults from my {{football map}} template as they were chosen for London football stadia rather than tropical cyclones.
  • Default sizes are as you suggest. Both need to be set at present, but the aspect ratio option if only width is added is on my TODO list.
  • The example to the right allows mapframe to automatically set the zoom, longitude and latitude parameters. I'm surprised this is working with the static maps, as I thought this was a bug and only worked in preview. As it seems to be fixed, the mapframe documentation needs updating.
  • The stroke-width, color and symbol shape will become the defaults when test2 options are implemented.
There are a few other things I haven't done yet, like using the Wikidata ids for the storm colours rather than the storm type names.
I suppose one additional thing is get the cyclone Wikidata item from the article page if the parameter isn't set. Then a map on a cyclone page will work using {{cyclone map}} with no parameters. —  Jts1882 | talk  15:05, 25 June 2020 (UTC)[reply]
Fantastic. Once the final bits are done, I think we are ready to propose this for live use. Thanks for all the hard work! Cheers, Rehman 15:34, 25 June 2020 (UTC)[reply]
I have changed the defaults to match the maps using |mode=test2 and edited the maps above so they still match the discussion (at least approximately).
  • The map size can now be set either using |width= and |height= or only one of them with a 4:3 aspect ratio or using the defaults you suggested.
  • The template now allows <mapframe> to automatically set zoom, latitude and longitude if the parameters are not set.
  • So the map above can be generated with a minimal call of {{Cyclone map |id1=Q15397819 }}.
Any other changes to the defaults and appearance needed? Maybe slightly bigger symbols? —  Jts1882 | talk  10:31, 27 June 2020 (UTC)[reply]