Map updates

Comments: 9 - Last Comment by Joel Getz on Oct 31, 2016   Comment Filter:
Posted on Jun 20, 2016

How have other utilities handled map updates especially in their rural locations where bandwidth can be an issue?

Point your RSS reader here for a feed of the latest messages in this topic
RE: Map updates
Posted on Jun 21, 2016 in response to: Joel Getz
Is this for mobile tc or i/dispatcher?
RE: Map updates
Posted on Jun 21, 2016 in response to: stevenon

At our company the map is zipped.   The filed downloads the map to there machine will on the network and the program used to download the map unzips the map and does the install.

RE: Map updates
Posted on Jun 22, 2016 in response to: stevenon

This is for our Mobile TC users. They still would be on the company network, but at our smaller offices we do not have high speed internet and we continually time out on the map updates for the tablets which results in corrupted maps.

RE: Map updates
Posted on Jun 22, 2016 in response to: Joel Getz

We wrote an updater program for the MobileTC Client. It's bundled with our installs and provides functionality to download zipped up application files and maps on a user-requested basis. The files include the /custom folder zipped up so we have a great turnaround for implementing new features.  We have trained our users to only download the map within wifi range of the yard, as our map is 250mb zipped up. They update their forms daily. 

RE: Map updates
Posted on Jun 22, 2016 in response to: kclark

We do the same here at SMUD too! Except our guys update their maps in the field through a Verizon VPN Cloud, 4G LTE!!

We added a "Map Update" in the Menu form that calls a bat script which calls a powershell script to download the zipped map file, enhacement files, or fixes.


function m_updateMap() //for Menu.htm
  WshShell = new ActiveXObject("WScript.Shell");
   displayBriefError("Map Update File Not Found!, Plese Contact OMS Administrator!");


@echo off

Start Powershell.exe -NoExit -file \\web01server\MapzipfileShare\Get-MobileTCMap.ps1


tried to upload the ps1, apparently HxGN doesn't like the attachment. NOTE!!! Execution Policies for running powershell scripts by default are set to restricted, you may have to go to the client machine launch both powershell and powershell (x86) and unrestricted the execution policy. here's the command: Set-ExecutionPolicy Unrestricted -Force, if you sign the .ps1 this command isn't required we didnt' sign it because we only have 150 users.

Get Mobile TC mapfile

Last changed 20160519 - Steven On


################# Logging ###################################################
#logging Vars
$logCheck=Test-Path -Path $logFile

#log check if not there create one!
    New-Item -Path "c:\temp\" -Name MobileTCClientMapUpdate.txt -ItemType file -Force -EA silentlycontinue | Out-Null
$logFileCDate=Get-ChildItem $logFile | Select CreationTime

#if log is older than 30 days delete and create a new one!
if($logFileCDate -gt $logFile2w){
    Remove-Item -Path $logFile -Force | Out-Null
    New-Item -Path c:\temp\ -Name MobileTCClientMapUpdate.txt -ItemType file -Force -EA silentlycontinue | Out-Null
#logging function
function log($string)
    $todaysDate = get-date
    $todayDate = $todaysDate.ToShortDateString() +" "+ $todaysDate.ToShortTimeString()
    $string = $todayDate + ": " + $string
    $string | Out-File -FilePath $logfile -append

################# MAIN PROCESS ##############################################
$istag = Get-WMIObject -Class win32_systembios | Select __SERVER
$istag = $istag.__SERVER

write-host "  _____ __  __ _    _ _____    _         _  _  __ "
write-host " / ____|  \/  | |  | |  __ \  (_)      _| || |/_ |"
write-host "| (___ | \  / | |  | | |  | |  _ ___  |_  __  _| |"
write-host " \___ \| |\/| | |  | | |  | | | / __|  _| || |_| |"
write-host " ____) | |  | | |__| | |__| | | \__ \ |_  __  _| |"
write-host "|_____/|_|  |_|\____/|_____/  |_|___/   |_||_| |_|"

Write-Host ""

$smudMapDate=gci C:\win32app\ingr\IMobileTC\MobileInservice\Configurations\Custom\maps\smud_mobile.map -EA silentlycontinue | Select LastWriteTime
$curDate = get-date
$curShortDate = $curDate.toShortDateString()
$curShortDateTime = $curShortDate + " 12:30:00 AM"

$formatSmudMapDate= $smudMapDate.LastWritetime
if($smudMapdate -eq $null){
 log("No Map File Found")
 Write-Host "No Map File Found" -ForegroundColor Red
 Write-Host ""
 log("Map Date`:  $formatSmudmapdate")
 Write-Host "Map Date`:  $formatSmudmapdate"
 Write-Host ""

if($smudMapDate.LastWritetime -gt $curShortDateTime){
 log("Your Map is up to date")
    Write-Host "Your Map is up to date" -ForegroundColor Green
 Write-Host ""
    $exitMe=Read-Host "Press Enter to Exit!"
 if($exitMe.length -ge 0){stop-process -name powershell -force -EA silentlycontinue}

 log("Map Date`:  $formatSmudmapdate")

 log(".....Copying smud_map.zip")
    Write-Host ".....Copying smud_map.zip"
    New-Item -Path c:\temp -Name mobileTCFiles -ItemType directory -Force | Out-Null

    #file location Vars
 $mobileTCMapZip= $mobileTCMap + "\smud_mobile.zip"

  Copy-Item -Path "\\swppoms92web01\OMS_MAP\smud_map.zip" -Destination $fileLoc -ErrorAction stop | Out-Null
  Remove-Item -Path $fileLoc -Force -Recurse
        Write-Host "Copy Zip Map Action Error: No access to \\swppoms92web01\OMS_MAP `n Contact The MobileTC Administrator" -ForegroundColor Red
  log("Copy Zip Map Action Error: No access to \\swppoms92web01\OMS_MAP `n Contact The MobileTC Administrator")
    Write-Host ".....Unzipping smud_map.zip"
 log(".....Unzipping smud_map.zip")
    #Unzip Copy Vars
    $helper = New-Object -ComObject Shell.Application
    $files = $helper.NameSpace($zipMap).Items()

    Start-Sleep -Seconds 2

    Write-Host ".....Closing MobileTC"
 log(".....Closing MobileTC")
    Stop-Process -Name IngrViewer -Force -EA silentlycontinue | Out-Null
 Remove-Item -Path c:\win32app\ingr\IMobileTC\MobileInservice\Configurations\Custom\Maps\* -force -erroraction silentlycontinue
    Write-Host ".....Updating MapFile"
 log(".....Updating MapFile")
 Copy-Item -Path "$fileLoc\*" -Destination $mobileTCMap -Force -ErrorAction silentlycontinue
 Write-Host "......Updating Enhacement Files" -ForegroundColor Yellow
 log(".....Updating Enhacement Files")
 Copy-Item -Path "$goldenLoc\*" -Destination $enhacementList -Recurse -Force -ErrorAction silentlycontinue
    Remove-Item -Path $fileLoc -Force -Recurse -ErrorAction silentlycontinue 
 Remove-Item -Path $mobileTCMapZipLoc -Force -ErrorAction silentlycontinue

    Write-Host ""
    Write-Host ""
    Write-Host "Mapfiles Updated!" -ForegroundColor Green
 log("Mapfiles Updated!")
    $exitMe=Read-Host "Press Enter to restart MobileTC"


    Start-Process -FilePath $prc -PassThru
 if($exitMe.length -ge 0){
  stop-process -name powershell -force -EA silentlycontinue


RE: Map updates
Posted on Jun 22, 2016 in response to: stevenon

Thank you all for the quick feeback!

RE: Map updates
Posted on Jun 22, 2016 in response to: stevenon

This is a pretty elegant way of handling it too. Nicely done SMUD. I'm a bit surprised Hexagon hasn't implemented something like this in their core product, as it seems like we're all doing the same thing. 

RE: Map updates
Posted on Sep 9, 2016 in response to: kclark

I'm late to the party, but just for posterity I thought I'd throw in our solution.

First off, on the map migration side, the last step of the automated process is to use a third party program called RTPatch to create a small diff file between yesterday's map to today's. Depending on how much change occured during a given day, we find that patch file usually is between 80k and 400k. This is on a 900MB map file. After the patch file is created, another step on the server creates an MD5 hash of the map file. It then stores the map file, patch file, and a text file with the MD5 hash on a share on the map server. It also appends the map file date and MD5 hash to one long text file with all of the map details for each day.

One the client side is a listener. This runs every 30 minutes all day. It creates an MD5 hash of the client map file and compares that with the latest MD5 on the the server's map file list. If it's out of date, it grabs a series of patch files from the server (could be more than one patch if the client is out of date by more than a day). It then creates a working copy of the client's map and applies all of the missing patches. Once it's got a map file ready to go, if MobileTC is not running then it just copies over the new map. If it is running, it pops up for the user to let them know that a new map is ready. It then watches the MobileTC executable to see when it shuts down and once it shuts down, it copies in the new map file immediately. It also logs to the server that it updated the map file.

This is a bunch of work to get going but now that it is going, there are some great points for our solution

1) Very low data usage. Couple hundred k on most days.

2) Very low interaction for the users. They don't see anything while the map is being prepped. Once it is ready, if they don't want the map immediately they can click to postpone and the map will copy in as soon as the MobileTC executable shuts down - likely at the end of their day. If they do want the map immediately, the patch process is just a shutdown and restart of MobileTC.

3) We log all map file updates. This allows us to report and see if users are way behind on maps for some reason and contact them to get it fixed.

RE: Map updates
Posted on Oct 31, 2016 in response to: Joel Getz

Thank you to everyone who has commented on this topic. Will let everyone know what we decide to do as we are moving towards our 9.3 Upgrade.

Add a Comment

Please sign in on the right menu to comment.  If you do not have an account, please Join now.