User:DTankersley (WMF)/misc/how to: maps/code samples
This page is currently a draft.
|
Code Samples for creating maps with <maplink>
edit1. Just a link with coordinates
editThe easiest way to add a new link to a map for Estes Park is adding the following code in the page:
<maplink latitude="40.377117" longitude="-105.525514" />
This displays a <maplink>
that will automatically convert the latitude and longitude into degrees, minutes and seconds.
2. A link with custom text
editYou can also add in custom text to display something like this:
Estes Park, CO
3. A link with custom text without a map icon
editIf you would prefer your map link to display without the map icon, you can edit your code to be something like this:
<maplink latitude="40.377117" longitude="-105.525514" text="An interactive map of Estes Park, CO" class="no-icon" />
4. Set a custom zoom level for the map, once it's opened
editLet's now set a zoom level for the interactive map, since you might want to display your map closer into the city:
<maplink latitude="40.377117" longitude="-105.525514" text="An interactive map of Estes Park, CO" zoom="15" />
BUG REPORT: using text with frameless shouldn't show frame
editAs reported in phab:T151703#2825105