Gmap - Google Map Module & Macro

We have a module installed in the website backend that allows including Google Maps images in forum posts and other content pages. When posting, you can find a link to the tool by expanding the 'Input Format' section and clicking the link under the bbCode section. Learning to use the gmaps functionality is not for the faint of heart, but it has its uses. I've written the explanation below and inserted it into the tool page as well to help those who want to includes maps - please read it before and while using the tool.

Using the GMap Macro creation tool:
When you click the gmap macro link a new window will appear.
Using the controls in the macro tool, set the map as you would like it to appear. Select the generated text contents of the macro by clicking on macro's textarea field and then copy and paste it into the body of your post.

You can click-and-drag the map and zoom in and out to get it positioned and scaled properly. Double-click on the map to re-center it at that point. You can left-click on the map to insert a marker. Unwanted markers
can be removed by left-clicking them. You might have to click twice to remove a marker that appears after double-clicking to re-center the map. Colored lines can be drawn on the map by selecting a line from the 'Click type' drop-down. You may have to click a few times to get the line to start. I haven't found a way to remove a line from the generated text string; closing the window and starting over or editing the line section after pasting are workarounds.

Be sure to change the "ID" field to a specific and hopefully unique text string. The default is "map"; if there is more than one map on a page, such as one of the site's summary pages, then only the first map with a given ID will be displayed and there will be big empty spaces where the other maps go.

If you change the map dimensions be sure to include the "px" after the value. DO NOT make maps more than 500px wide!
To update the view after changing dimensions, change one of the drop-down selections and then change it back.

You CANNOT edit the text in the Gmap Macro Creation tool. You CAN edit it after pasting it into your post, but be careful and be ready for a trial-and-error session! The Gmap filter does not like extra spaces or line-breaks within the gmap code string.



Customizing the Gmap code string:
The text below was edited after pasting it into the body of the post and specifies the Crestline/Marshall map (shown above).

[gmap |id=map |center=-117.3233413696289, 34.21833196863014
 |zoom=5 |width=500 |height=350 |align=None |control=Large
 |type=Hybrid |markers=number::
-117.31372833251953,34.236073463987154:Crestline Launch - 5,200 
MSL, 3,400 vertical. Mostly HG, but PG OK in lighter winds. + 
-117.30205535888672,34.20995668462769:Marshall Peak - 
4,000 MSL, 2,300 vertical. HG and PG - all levels. + 
-117.3233413696289,34.193203619503:LZ - Andy Jackson Airpark - 1,700 MSL]


Changing "markers=" to "markers=number::" causes the markers to be numbered sequentially.
Using "markers=letter::" is the other option.

Inserting a colon (:) and some text immediately after the lon/lat values for a marker will cause an info
bubble containing that text to appear when a viewer clicks on the marker. (Firefox breaks
long lines in the bubbles wherever it wants, so do not waste your time trying to fix that!)

There are some other similar gmap capabilities for which documentation will be forthcoming.

One could conceivably generate a simple map string and then paste in properly formatted GPS flight track points to show a flight (in 2d). Perhaps one day this will be enabled via the tool.



Forums > Forum Help
News > Website