Geocaching with Memory Map 6

Prevent moorland fires - Ban disposable BBQs
Why you should consider having a dumbphone in your backpack

Paperless Geocaching is quite well documented for Memory Map 5 and PDA devices, but times have moved on, so I wanted to see if I could bring it up to date.

Geocaching is a very popular hobby, which combines GPS navigation with treasure hunting. There’s a more thorough explanation on the Geocaching.com website here https://www.geocaching.com/guide/

You can geocache straight from the app, but for better mapping, it’s useful to overlay the geocache locations on to Ordnance Survey mapping.

Windows Mobile PDA’s were popular geocaching devices, but smartphones have rendered them (almost) obsolete.

The software that is most commonly used for OS-mapped geocaching is a combination of GSAK and Memory Map. GSAK is a geocache database management tool, and Memory Map adds the OS mapping. Memory Map v5 and earlier was available for both desktop PCs and Windows PDAs. So, with GSAK, Memory Map and some custom icons, you had the ultimate mobile geocaching setup. You can get the icons for older Memory Map and PDA’s here – http://blog.dixo.net/downloads/lordelphs-lovely-icons/

LordElph’s icons were great with PDA’s and Memory Map 5, but now we’ve moved to the smartphone age, the newest version of the app needs different macros. There are pros and cons to the Android/Apple versions of Memory Map.

Cons
No custom icons.
No PDA support.
Pros
Mobile phone support.
No need to upload maps.
Faster transfer and sync of data.

The biggest of these cons is the fact that there is no longer support for custom icons. That means that we are limited to the default icons such as anchor, dot, man overboard etc. Luckily there is a Geocache icon, however it isn’t ideal that all Geocaches, regardless of type, are the same green box.

The pull-down shows the available icon types for Memory Map 6.

So, the default way for GSAK to handle this is that every cache type is given a different icon type. Skulls, flags, car, etc, can all be assigned to Traditional, Multi, Puzzle, etc. I looked into this and wondered if the default Geocache icon could be used for ALL cache types, but the colour could be changed? It seems it can.

I’ve created a BETA macro for GSAK v9, which works for me. Here’s how it looks in action:

Green Geocaches are Traditional, yellow are multi, blue are puzzle/mystery. The Green first aid box shows caches that need maintenance.

It’s clunky because it has to export every cache type individually. So, when you run the macro, if you have four cache types in your filter, it will run four separate exports.

Secondly, it exports based on your User Flag Set. That means that you need to set the GSAK User Flag for the caches you wish to export.

The good news though is that when you sync the GPX to your mobile device, the icons carry over flawlessly.

I’ve found that the best way to transfer GPX files between desktop and mobile device is using WhatsApp Web / Whatsapp Mobile, then opening the file on your phone with Memory Map. Alternatively, you can save the file to Downloads/Memory Map on your phone, but you’ll probably need a file manager to move it. Then you can use MM’s import function. It’s just less hassle using Whatsapp.

Grab the macro here (right click and Save As).

Here’s the macro content. As you can see, there’s a little bit of editing needed to check the Memory Map path, but that should be it. As it’s Beta, I can’t make any promises and I can’t promise to support it going forward, but please comment if it works for you.

#*******************************************
# MacVersion = 1.0
# MacDescription = PupPort-Android-Beta
# MacAuthor = Mark
# MacFileName = PupPort-Android-Beta.gsk
# MacUrl =
#*******************************************

# EDIT THE LINE BELOW if you need to!
$MMPATH = "C:\Program Files (x86)\Memory-Map\Navigator-6\MMNav.exe"

# That's all you NEED to edit.  If you want to delve further, though, then read on BUT in particular please check out the lines towards the end of this file,
# In the section at the end titled "<data> VarName=$GPX", the following lines alter the labels and descriptions (hints) on Memory Map--->
# edtFormat.Text=%code.  %hint.  By %By. (%Dif/%Ter) Last Logs:%last4
# edtWaypoint.Text=%name
# By editing those two lines, you'll alter how the icons are displayed.
# Anyway, let's crack on with the rest of the macro...

IF FILEEXISTS($MMPATH)
ELSE
PAUSE msg="Welcome!  Help me find your copy of Memory Map 6 - please edit the macro and alter the line near the top that says MMPATH="
CANCEL
ENDIF

#We are going to set three variables here -
#We set $SAVETO to your GSAK data folder.  We'll save your exports here.
#We set $MYID to your GC.com ID number.
#Then we set $TEMPFILE which is a file we create mid-macro, no need to change the name of this.

$SAVETO = Sysinfo("gsakini;TfmConfig;edtDataStore.Text")+"\"
$MYID = Sysinfo("gsakini;TfmConfig;EdtGeoName.Text")
$TEMPFILE = $SAVETO+"temp.gpx"

#Lets set a search within this macro - we'll search for whatever is in your current filter.  We'll use it again in MFILTER commands.
MACROFLAG Type=SET Range=Filter

# Now we do a series of sub-searches to find Found caches, Unavailables, etc, and do an individual export for each one.
# We check whether there are any caches in the sub-search.  This saves time but more importantly, if there are zero matches, instead of exporting nothing, GSAK decides to export EVERYTHING!
# This version of Memory Map is particularly fickle.  We need to do a separate export for every cache type!
# I did try to do all the RUNPGM commands together at the end, but it seems that Memory Map can't keep up.

#Found
MFILTER Where=UserFlag
MFILTER Where=MACROFLAG Join=AND
MFILTER Where=FOUND Join=AND
$LOCALEFOUND=$SAVETO+"1-Found.gpx"
IF $_FilterCount>0 
MACROSET  Dialog=GPX VarName=$GPX name=<macro>
EXPORT Type=GPX Settings=<macro> File=$TEMPFILE
$Round1 = GetFile($TEMPFILE)
$Round1a = Replace("</wpt>",$swap1,$Round1)
$Round1b = Replace("<sym>Geocache Found","<sym>Geocache",$Round1a)
$Data = PutFile($LOCALEFOUND,$Round1a)
RUNPGM pgm=$MMPATH parms=$LOCALEFOUND Wait=No Hide=No
ELSE
ENDIF

#Unavail
MFILTER Where=UserFlag
MFILTER Where=MACROFLAG Join=AND
MFILTER Where=STATUS='T' or STATUS='X' Join=AND
$LOCALEUN=$SAVETO+"2-Unavailable.gpx"
IF $_FilterCount>0 
MACROSET  Dialog=GPX VarName=$GPX name=<macro>
EXPORT Type=GPX Settings=<macro> File=$TEMPFILE
$Round2 = GetFile($TEMPFILE)
$Round2a = Replace("</wpt>",$swap2,$Round2)
$Round2b = Replace("<sym>Geocache","<sym>First_aid",$Round2a)
$Data = PutFile($LOCALEUN,$Round2b)
RUNPGM pgm=$MMPATH parms=$LOCALEUN Wait=No Hide=No
ELSE
ENDIF

#OtherCacheTypes
MFILTER Where=UserFlag
MFILTER Where=MACROFLAG Join=AND
MFILTER Where=CACHETYPE='A'or CACHETYPE="C" or CACHETYPE="D" or CACHETYPE="E" or CACHETYPE="F" or CACHETYPE="G" or CACHETYPE="H" or CACHETYPE="I" or CACHETYPE="L" or CACHETYPE="O" or CACHETYPE="P" or CACHETYPE="Q" or CACHETYPE="R" or CACHETYPE="U" or CACHETYPE="V" or CACHETYPE="W" or CACHETYPE="Y" or CACHETYPE="Z" Join=AND
MFILTER Where=STATUS='A' Join=AND
$LOCALEOTHER=$SAVETO+"3-Other.gpx"
IF $_FilterCount>0 
MACROSET  Dialog=GPX VarName=$GPX name=<macro>
EXPORT Type=GPX Settings=<macro> File=$TEMPFILE
$Round3 = GetFile($TEMPFILE)
$Round3a = Replace("</wpt>",$swap3,$Round3)
$Data = PutFile($LOCALEOTHER,$Round3a)
RUNPGM pgm=$MMPATH parms=$LOCALEOTHER Wait=No Hide=No
ELSE
ENDIF

#Owned
MFILTER Where=UserFlag
MFILTER Where=MACROFLAG Join=AND
MFILTER Where=OwnerID=$MYID Join=AND
$LOCALEOWNED=$SAVETO+"4-Owned.gpx"
IF $_FilterCount>0 
MACROSET  Dialog=GPX VarName=$GPX name=<macro>
EXPORT Type=GPX Settings=<macro> File=$TEMPFILE
$Round4 = GetFile($TEMPFILE)
$Round4a = Replace("</wpt>",$swap4,$Round4)
$Round4b = Replace("<sym>Geocache","<sym>Person",$Round4a)
$Data = PutFile($LOCALEOWNED,$Round4b)
RUNPGM pgm=$MMPATH parms=$LOCALEOWNED Wait=No Hide=No
ELSE
ENDIF

#Trad
MFILTER Where=UserFlag
MFILTER Where=MACROFLAG Join=AND
MFILTER Where=CACHETYPE='T' Join=AND
MFILTER Where=STATUS='A' Join=AND
$LOCALETRAD=$SAVETO+"5-Trad.gpx"
IF $_FilterCount>0 
MACROSET  Dialog=GPX VarName=$GPX name=<macro>
EXPORT Type=GPX Settings=<macro> File=$TEMPFILE
$Round5 = GetFile($TEMPFILE)
$Round5a = Replace("</wpt>",$swap5,$Round5)
$Data = PutFile($LOCALETRAD,$Round5a)
RUNPGM pgm=$MMPATH parms=$LOCALETRAD Wait=No Hide=No
ELSE
ENDIF

#Multi
MFILTER Where=UserFlag
MFILTER Where=MACROFLAG Join=AND
MFILTER Where=CACHETYPE='M' or CACHETYPE="B" Join=AND
MFILTER Where=STATUS='A' Join=AND
$LOCALEMULTI=$SAVETO+"6-Multi.gpx"
IF $_FilterCount>0 
MACROSET  Dialog=GPX VarName=$GPX name=<macro>
EXPORT Type=GPX Settings=<macro> File=$TEMPFILE
$Round6 = GetFile($TEMPFILE)
$Round6a = Replace("</wpt>",$swap6,$Round6)
$Data = PutFile($LOCALEMULTI,$Round6a)
RUNPGM pgm=$MMPATH parms=$LOCALEMULTI Wait=No Hide=No
ELSE
ENDIF

# That's the end of the individual exports, so we're done here.  Below is some housekeeping.
# Clear the filter by finding all caches that aren't type "X",  This is clunky, type "X" doesn't exist, therefore Reverse makes it find everying.

MFILTER Where=MACROFLAG

# Now we are in to all the pre-defined variables, that we bung at the end of the file.

# Here are, maongst others, the Find-and-Replace strings that change the colours of the icons.

<data> VarName=$swap1
<extensions>
<fill xmlns="http://www.topografix.com/GPX/gpx_style/0/2">
<color>000000</color>
</fill>
</extensions>
</wpt>
<enddata>

<data> VarName=$swap2
<extensions>
<fill xmlns="http://www.topografix.com/GPX/gpx_style/0/2">
<color>00ff00</color>
</fill>
</extensions>
</wpt>
<enddata>

<data> VarName=$swap3
<extensions>
<fill xmlns="http://www.topografix.com/GPX/gpx_style/0/2">
<color>0000ff</color>
</fill>
</extensions>
</wpt>
<enddata>

<data> VarName=$swap4
<extensions>
<fill xmlns="http://www.topografix.com/GPX/gpx_style/0/2">
<color>0000ff</color>
</fill>
</extensions>
</wpt>
<enddata>

<data> VarName=$swap5
<extensions>
<fill xmlns="http://www.topografix.com/GPX/gpx_style/0/2">
<color>003300</color>
</fill>
</extensions>
</wpt>
<enddata>

<data> VarName=$swap6
<extensions>
<fill xmlns="http://www.topografix.com/GPX/gpx_style/0/2">
<color>cc9900</color>
</fill>
</extensions>
</wpt>
<enddata>

<data> VarName=$GPX
[TfmExportGpx]
cbxLimit.Text=0
cbxUserNotes.Checked=False
chkActual.Checked=False
chkDefault.Checked=False
chkExtra.Checked=False
chkMyLogs.Checked=False
chkSymbol.Checked=False
edtFormat.Text=%code.  %hint.  By %By. (%Dif/%Ter) Last Logs:%last4
edtMax.Text=
edtMaxGps.Text=60
edtWaypoint.Text=%name
rbtGpx.Checked=True
rbtLoc.Checked=False
edtProblem.Text=
edtExtra.Text=
chkChild.Checked=False
chkOnlyChild.Checked=False
rbtAllChildren.Checked=True
rbtOnlyFlagged.Checked=False
rbtOnlyUnFlagged.Checked=False
chkApplyName.Checked=False
chkForce.Checked=True
cbxVersion.Text=Ver 1.0
chkLogAlternate.Checked=False
fnmTo.Text=
chkCounts.Checked=False
rbtGGZ.Checked=False
[TfmExportGpx.cbxRecent.Items]
<enddata>

Prevent moorland fires - Ban disposable BBQs
Why you should consider having a dumbphone in your backpack
  •  
  •  
  •  
  •  

Leave a Reply