I love the maps that Karl at Great Circle Mapper makes available. Now I’ve made it easier to embed them in a blog post on WordPress. Added bonus: It automatically includes the links back to Karl’s site per the notes in the FAQ page. Simply install the (very lightweight) plugin and you get a new shortcode to use on your site: [gcmap].
Currently available for download via the wordpress plugins repository here.
Parameters
The following parameters are available in the Great Circle Mapper plugin:
path
(Required) This is the route you want mapped. It is required. If it is not specified then a small error message will display rather than the map. Use the typical gcmap.com formatting (e.g. “EWR-LAX” or “las-den-nrt” or “lax-cdg;lhr-sfo”).
width
(optional) Determines the width of the image displayed. Default is 600 pixels which should work well in most themes.
height
(optional) Determines the height of the image displayed. Default is 300 pixels which should work well in most themes.
pathwidth
(optional) Determines the width of the line used in drawing the maps. Default is two pixels.
pathcolor
(optional) Determines the color of the path drawn. Default is blue. Available options are:
- blue
- red
- violet
- black
- green
- white
- cyan
- magenta
- yellow
- orange
- navy
bgcolor
(optional) Determines which background is used for the map. Default is bluemarble. Available options are:
- bluemarble – NASA Blue Marble maps
- light – Light background line map
- plain – default GCmap.com line map
- facebook – Facebok heatmap
- night – Nighttime light pollution map
dottag
(optional) Determines what “tag” is placed at the dot where each airport is. Default is iatacity. Available options are:
- none – nothing (I have no idea why you’d use this, but it is an option)
- dot – Just a dot, no text
- iata – IATA code
- city – City Name
- airport – Airport Name
- iatacity – City Name + IATA code
etops
(optional) Want to see ETOPS “no-go” zones on the map? This is the parameter to set. Default is 0. Available options are:
- 60
- 75
- 90
- 120
- 138
- 180
- 207
- 240
- 330
Caption
In between the [gcmap] and [/gcmap] tags you can enter a caption. This is optional and will be inserted using the WordPress tags. The proper attribution for the maps will be included on a separate line after the caption. Note that if you do NOT include a caption and [/gcmap] tag then you must “close” the tag with a “/” inside the main [gcmap] entry so that it renders properly.
Examples
Here are a number of usage examples showing off the various different parameters
Defaults
Specify just a path: [gcmap path=’ewr-lax’ /]
Map generated by the Great Circle Mapper - copyright © Karl L. Swartz.
Path options
Change the color and size of the path: [gcmap path=’ewr-lax’ pathcolor=red pathwidth=”4″][/gcmap] (Note that the parameters can have no quotes, single quotes or double quotes)
Map generated by the Great Circle Mapper - copyright © Karl L. Swartz.
Background map
Change the background to the “normal” line map: [gcmap path=’ewr-lhr’ bgcolor=’plain’][/gcmap]
Map generated by the Great Circle Mapper - copyright © Karl L. Swartz.
Airport names & Caption
Show the airport name rather than the city name: [gcmap path=’ewr-lhr’ dottag=airport]What is that airport called??[/gcmap]
Map generated by the Great Circle Mapper - copyright © Karl L. Swartz.
ETOPS & Caption
Let’s put an ETOPS 138 overlay on the map and a caption, too: [gcmap path=’gru-fra’ etops=138]Can we make it all the way there??[/gcmap]
Map generated by the Great Circle Mapper - copyright © Karl L. Swartz.
Multiple routes
Lots of flights coming up:[gcmap path=’bcn-mad-bkk;hkg-syd;syd-dfw-jfk’ dottag=iata]Round and round we go![/gcmap]
Map generated by the Great Circle Mapper - copyright © Karl L. Swartz.
Want to see something else?? Leave a note below and I’ll try to come up with an answer.
Found a bug? Report it below or in the wordpress.org plugin homepage.
Beautiful! This is going to come in handy for lots of bloggers. Can’t wait to test it out.
All I got was this: PCLZIP_ERR_BAD_FORMAT (-10) : Unable to find End of Central Dir Record signature
Can you help?
Thanks!
Took a bit of time to get it on to the WordPress.org site. It is there now. You can download it from http://wordpress.org/plugins/great-circle-mapper/.
Thanks!
Any way to choose different colors for each path?
hej Seth
I am using wordpress 3.92 and no maps show up!