Wikipedia:WikiProject Skyscrapers/Map template

This page is a template for using Template:OSM Location Map to create a map of tallest buildings for tall building lists. To use it, copy and paste the wikitext below to the "Map of tallest buildings" section.

{{OSM Location map
| coord={{coord|0|0}} <!--Replace with the city's coordinates-->
| float=center| zoom =15
| width = 1000 |height = 500
| shape1=n-circle
| shape-outline1=#000
| mark-size1=15

| mark-title1 =&nbsp;
| mark-coord1 = }} | shape-color1=#
| mark-title2 =&nbsp;
| mark-coord2 = }} | shape-color2=#
| mark-title3 =&nbsp;
| mark-coord3 = }} | shape-color3=#
| mark-title4 =&nbsp;
| mark-coord4 = }} | shape-color4=#
| mark-title5 =&nbsp;
| mark-coord5 = }} | shape-color5=#
| mark-title6 =&nbsp;
| mark-coord6 = }} | shape-color6=#
| mark-title7 =&nbsp;
| mark-coord7 = }} | shape-color7=#
| mark-title8 =&nbsp;
| mark-coord8 = }} | shape-color8=#
| mark-title9 =&nbsp;
| mark-coord9 = }} | shape-color9=#
| mark-title10 =&nbsp;
| mark-coord10 = }} | shape-color10=#
| mark-title11 =&nbsp;
| mark-coord11 = }} | shape-color11=#
| mark-title12 =&nbsp;
| mark-coord12 = }} | shape-color12=#
| mark-title13 =&nbsp;
| mark-coord13 = }} | shape-color13=#
| mark-title14 =&nbsp;
| mark-coord14 = }} | shape-color14=#
| mark-title15 =&nbsp;
| mark-coord15 = }} | shape-color15=#
| mark-title16 =&nbsp;
| mark-coord16 = }} | shape-color16=#
| mark-title17 =&nbsp;
| mark-coord17 = }} | shape-color17=#
| mark-title18 =&nbsp;
| mark-coord18 = }} | shape-color18=#
| mark-title19 =&nbsp;
| mark-coord19 = }} | shape-color19=#
| mark-title20 =&nbsp;
| mark-coord20 = }} | shape-color20=#
| mark-title21 =&nbsp;
| mark-coord21 = }} | shape-color21=#
| mark-title22 =&nbsp;
| mark-coord22 = }} | shape-color22=#
| mark-title23 =&nbsp;
| mark-coord23 = }} | shape-color23=#
| mark-title24 =&nbsp;
| mark-coord24 = }} | shape-color24=#
| mark-title25 =&nbsp;
| mark-coord25 = }} | shape-color25=#
| mark-title26 =&nbsp;
| mark-coord26 = }} | shape-color26=#
| mark-title27 =&nbsp;
| mark-coord27 = }} | shape-color27=#
| mark-title28 =&nbsp;
| mark-coord28 = }} | shape-color28=#
| mark-title29 =&nbsp;
| mark-coord29 = }} | shape-color29=#
| mark-title30 =&nbsp;
| mark-coord30 = }} | shape-color30=#
| mark-title31 =&nbsp;
| mark-coord31 = }} | shape-color31=#
| mark-title32 =&nbsp;
| mark-coord32 = }} | shape-color32=#
| mark-title33 =&nbsp;
| mark-coord33 = }} | shape-color33=#
| mark-title34 =&nbsp;
| mark-coord34 = }} | shape-color34=#
| mark-title35 =&nbsp;
| mark-coord35 = }} | shape-color35=#
| mark-title36 =&nbsp;
| mark-coord36 = }} | shape-color36=#
| mark-title37 =&nbsp;&nbsp;
| mark-coord37 = }} | shape-color37=#
| mark-title38 =&nbsp;
| mark-coord38 = }} | shape-color38=#
| mark-title39 =&nbsp;
| mark-coord39 = }} | shape-color39=#
| mark-title40 =&nbsp;
| mark-coord40 = }} | shape-color40=#
| mark-title41 =&nbsp;
| mark-coord41 = }} | shape-color41=#
| mark-title42 =&nbsp;
| mark-coord42 = }} | shape-color42=#
| mark-title43 =&nbsp;
| mark-coord43 = }} | shape-color43=#
| mark-title44 =&nbsp;
| mark-coord44 = }} | shape-color44=#
| mark-title45 =&nbsp;
| mark-coord45 = }} | shape-color45=#
| mark-title46 =&nbsp;
| mark-coord46 = }} | shape-color46=#
| mark-title47 =&nbsp;
| mark-coord47 = }} | shape-color47=#
| mark-title48 =&nbsp;
| mark-coord48 = }} | shape-color48=#
| mark-title49 =&nbsp;
| mark-coord49 = }} | shape-color49=#
| mark-title50 =&nbsp;
| mark-coord50 = }} | shape-color50=#
| mark-title51 =&nbsp;
| mark-coord51 = }} | shape-color51=#
| mark-title52 =&nbsp;
| mark-coord52 = }} | shape-color52=#
| mark-title53 =&nbsp;
| mark-coord53 = }} | shape-color53=#
| mark-title54 =&nbsp;
| mark-coord54 = }} | shape-color54=#
| mark-title55 =&nbsp;
| mark-coord55 = }} | shape-color55=#
| mark-title56 =&nbsp;
| mark-coord56 = }} | shape-color56=#
| mark-title57 =&nbsp;
| mark-coord57 = }} | shape-color57=#
| mark-title58 =&nbsp;
| mark-coord58 = }} | shape-color58=#
| mark-title59 =&nbsp;
| mark-coord59 = }} | shape-color59=#
| mark-title60 =&nbsp;
| mark-coord60 = }} | shape-color60=#
| mark-title61 =&nbsp;
| mark-coord61 = }} | shape-color61=#
| mark-title62 =&nbsp;
| mark-coord62 = }} | shape-color62=#
| mark-title63 =&nbsp;
| mark-coord63 = }} | shape-color63=#
| mark-title64 =&nbsp;
| mark-coord64 = }} | shape-color64=#
| mark-title65 =&nbsp;
| mark-coord65 = }} | shape-color65=#
| mark-title66 =&nbsp;
| mark-coord66 = }} | shape-color66=#
| mark-title67 =&nbsp;
| mark-coord67 = }} | shape-color67=#
| mark-title68 =&nbsp;
| mark-coord68 = }} | shape-color68=#
| mark-title69 =&nbsp;
| mark-coord69 = }} | shape-color69=#
| mark-title70 =&nbsp;
| mark-coord70 = }} | shape-color70=#
| mark-title71 =&nbsp;
| mark-coord71 = }} | shape-color71=#
| mark-title72 =&nbsp;
| mark-coord72 = }} | shape-color72=#
| mark-title73 =&nbsp;
| mark-coord73 = }} | shape-color73=#
| mark-title74 =&nbsp;
| mark-coord74 = }} | shape-color74=#
| mark-title75 =&nbsp;
| mark-coord75 = }} | shape-color75=#
| mark-title76 =&nbsp;
| mark-coord76 = }} | shape-color76=#
| mark-title77 =&nbsp;
| mark-coord77 = }} | shape-color77=#
| mark-title78 =&nbsp;
| mark-coord78 = }} | shape-color78=#
| mark-title79 =&nbsp;
| mark-coord79 = }} | shape-color79=#
| mark-title80 =&nbsp;
| mark-coord80 = }} | shape-color80=#
| mark-title81 =&nbsp;
| mark-coord81 = }} | shape-color81=#
| mark-title82 =&nbsp;
| mark-coord82 = }} | shape-color82=#
| mark-title83 =&nbsp;
| mark-coord83 = }} | shape-color83=#
| mark-title84 =&nbsp;
| mark-coord84 = }} | shape-color84=#
| mark-title85 =&nbsp;
| mark-coord85 = }} | shape-color85=#
| mark-title86 =&nbsp;
| mark-coord86 = }} | shape-color86=#
| mark-title87 =&nbsp;
| mark-coord87 = }} | shape-color87=#
| mark-title88 =&nbsp;
| mark-coord88 = }} | shape-color88=#
| mark-title89 =&nbsp;
| mark-coord89 = }} | shape-color89=#
| mark-title90 =&nbsp;
| mark-coord90 = }} | shape-color90=#
| mark-title91 =&nbsp;
| mark-coord91 = }} | shape-color91=#
| mark-title92 =&nbsp;
| mark-coord92 = }} | shape-color92=#
| mark-title93 =&nbsp;
| mark-coord93 = }} | shape-color93=#
| mark-title94 =&nbsp;
| mark-coord94 = }} | shape-color94=#
| mark-title95 =&nbsp;
| mark-coord95 = }} | shape-color95=#
| mark-title96 =&nbsp;
| mark-coord96 = }} | shape-color96=#
| mark-title97 =&nbsp;
| mark-coord97 = }} | shape-color97=#
| mark-title98 =&nbsp;
| mark-coord98 = }} | shape-color98=#
| mark-title99 =&nbsp;
| mark-coord99 = }} | shape-color99=#
| mark-title100 =&nbsp;
| mark-coord100 = }} | shape-color100=#

| mark-title101 =&nbsp;
| mark-coord101 = }} | shape-color101=#
| mark-title102 =&nbsp;
| mark-coord102 = }} | shape-color102=#
| mark-title103 =&nbsp;
| mark-coord103 = }} | shape-color103=#
| mark-title104 =&nbsp;
| mark-coord104 = }} | shape-color104=#
| mark-title105 =&nbsp;
| mark-coord105 = }} | shape-color105=#
| mark-title106 =&nbsp;
| mark-coord106 = }} | shape-color106=#
| mark-title107 =&nbsp;
| mark-coord107 = }} | shape-color107=#
| mark-title108 =&nbsp;
| mark-coord108 = }} | shape-color108=#
| mark-title109 =&nbsp;
| mark-coord109 = }} | shape-color109=#
| mark-title110 =&nbsp;
| mark-coord110 = }} | shape-color110=#
| mark-title111 =&nbsp;
| mark-coord111 = }} | shape-color111=#
| mark-title112 =&nbsp;
| mark-coord112 = }} | shape-color112=#
| mark-title113 =&nbsp;
| mark-coord113 = }} | shape-color113=#
| mark-title114 =&nbsp;
| mark-coord114 = }} | shape-color114=#
| mark-title115 =&nbsp;
| mark-coord115 = }} | shape-color115=#
| mark-title116 =&nbsp;
| mark-coord116 = }} | shape-color116=#
| mark-title117 =&nbsp;
| mark-coord117 = }} | shape-color117=#
| mark-title118 =&nbsp;
| mark-coord118 = }} | shape-color118=#
| mark-title119 =&nbsp;
| mark-coord119 = }} | shape-color119=#
| mark-title120 =&nbsp;
| mark-coord120 = }} | shape-color120=#
| mark-title121 =&nbsp;
| mark-coord121 = }} | shape-color121=#
| mark-title122 =&nbsp;
| mark-coord122 = }} | shape-color122=#
| mark-title123 =&nbsp;
| mark-coord123 = }} | shape-color123=#
| mark-title124 =&nbsp;
| mark-coord124 = }} | shape-color124=#
| mark-title125 =&nbsp;
| mark-coord125 = }} | shape-color125=#
| mark-title126 =&nbsp;
| mark-coord126 = }} | shape-color126=#
| mark-title127 =&nbsp;
| mark-coord127 = }} | shape-color127=#
| mark-title128 =&nbsp;
| mark-coord128 = }} | shape-color128=#
| mark-title129 =&nbsp;
| mark-coord129 = }} | shape-color129=#
| mark-title130 =&nbsp;
| mark-coord130 = }} | shape-color130=#
| mark-title131 =&nbsp;
| mark-coord131 = }} | shape-color131=#
| mark-title132 =&nbsp;
| mark-coord132 = }} | shape-color132=#
| mark-title133 =&nbsp;
| mark-coord133 = }} | shape-color133=#
| mark-title134 =&nbsp;
| mark-coord134 = }} | shape-color134=#
| mark-title135 =&nbsp;
| mark-coord135 = }} | shape-color135=#
| mark-title136 =&nbsp;
| mark-coord136 = }} | shape-color136=#
| mark-title137 =&nbsp;
| mark-coord137 = }} | shape-color137=#
| mark-title138 =&nbsp;
| mark-coord138 = }} | shape-color138=#
| mark-title139 =&nbsp;
| mark-coord139 = }} | shape-color139=#
| mark-title140 =&nbsp;
| mark-coord140 = }} | shape-color140=#
| mark-title141 =&nbsp;
| mark-coord141 = }} | shape-color141=#
| mark-title142 =&nbsp;
| mark-coord142 = }} | shape-color142=#
| mark-title143 =&nbsp;
| mark-coord143 = }} | shape-color143=#
| mark-title144 =&nbsp;
| mark-coord144 = }} | shape-color144=#
| mark-title145 =&nbsp;
| mark-coord145 = }} | shape-color145=#
| mark-title146 =&nbsp;
| mark-coord146 = }} | shape-color146=#
| mark-title147 =&nbsp;
| mark-coord147 = }} | shape-color147=#
| mark-title148 =&nbsp;
| mark-coord148 = }} | shape-color148=#
| mark-title149 =&nbsp;
| mark-coord149 = }} | shape-color149=#
| mark-title150 =&nbsp;
| mark-coord150 = }} | shape-color150=#

| caption = Buildings taller than 100 m (328 ft) in [city]. An asterisk (*) next to the building's name indicates it is located outside the map.<br />
<small>{{flatlist|
* {{color box|#630|1950s and before}}
* {{color box|#b00|1960s}}
* {{color box|#d70|1970s}}
* {{color box|#dd0|1980s}}
* {{color box|#4b0|1990s}}
* {{color box|#0bb|2000s}}
* {{color box|#06c|2010s}}
* {{color box|#909|2020s}}
}}</small>
| auto-caption=15
}}

Updating the map

edit

Paste the text you need to update into the triple brackets below.

import re

PARAM_PAT = re.compile(r'\b(mark-(?:title|coord|size)|shape-color|shape|label|label-(?:pos|size)|ldx|ldy)(\d+)\b')

def shift_mark_params(text: str, insert_at: int, shift: int = 1) -> str:
    def repl(m):
        key, num = m.group(1), int(m.group(2))
        if num >= insert_at:
            return f"{key}{num + shift}"
        return m.group(0)
    return PARAM_PAT.sub(repl, text)

skyscraper_map="""
#insert the text for OSM Location Map template to be updated here
"""

print(shift_mark_params(skyscraper_map, insert_at=1, shift=1))