Calibrating a Map in Visio

Many years ago, I wrote a blog article about calibrating a map in Visio ( see ), but I used VBA and a shape from my friend Chris Roth / VisGuy. Well, I have now worked out how to calibrate a map without code!

This could be especially useful now that MapPoint has been deprecated Smile


I have created a single LL Marker master shape that does all of the work for me.

The simple graphics provides a cross-hair to locate the shape accurately on top of a map.


As usual with Visio, the smartness is in the ShapeSheet, :


For clarity, the formulas are as follows:

Cell Formula
User.LLTrigger =IF(AND(NOT(Prop.Latitude=0),Prop.Position=1),SETF(GetRef(ThePage!User.LLPosition1Lat),Prop.Latitude)+SETF(GetRef(ThePage!User.LLPosition1Lon),Prop.Longitude)+SETF(GetRef(ThePage!User.LLPosition1X),PinX)+SETF(GetRef(ThePage!User.LLPosition1Y),PinY),IF(AND(NOT(Prop.Latitude=0),Prop.Position=2),SETF(GetRef(ThePage!User.LLPosition2Lat),Prop.Latitude)+SETF(GetRef(ThePage!User.LLPosition2Lon),Prop.Longitude)+SETF(GetRef(ThePage!User.LLPosition2X),PinX)+SETF(GetRef(ThePage!User.LLPosition2Y),PinY),0))
User.LLNameTrigger =IF(ISERRVALUE(OR(INT(INDEX(0,Prop.LLName,",")),INT(INDEX(1,Prop.LLName,",")))),0,IF(OR(NOT(Prop.Latitude=INDEX(0,Prop.LLName,",")),NOT(Prop.Longitude=INDEX(1,Prop.LLName,","))),SETF(GetRef(Prop.Latitude),INDEX(0,Prop.LLName,","))+SETF(GetRef(Prop.Longitude),INDEX(1,Prop.LLName,",")),0))
User.LLPositionTrigger =IF(AND(NOT(ThePage!User.LLPosition1Lon=ThePage!User.LLPosition2Lon),Prop.Position=0),SETF(GetRef(Prop.Longitude),ThePage!User.LLPosition1Lon+(((PinX-ThePage!User.LLPosition1X)/(ThePage!User.LLPosition1X-ThePage!User.LLPosition2X))*(ThePage!User.LLPosition1Lon-ThePage!User.LLPosition2Lon)))+SETF(GetRef(Prop.Latitude),ThePage!User.LLPosition1Lat+(((PinY-ThePage!User.LLPosition1Y)/(ThePage!User.LLPosition1Y-ThePage!User.LLPosition2Y))*(ThePage!User.LLPosition1Lat-ThePage!User.LLPosition2Lat)))+SETF(GetRef(Prop.LLName),"=Prop.Latitude&"",""&Prop.Longitude"),0)
Hyperlink.BingMaps.Address =""
Hyperlink.BingMap.ExtraInfo ="lvl=11&sp=Point."&Prop.Latitude&"_"&Prop.Longitude&"_"&NAME()

This is all possible because of some User-defined cells were added to the page of the master:


When this master shaped is dropped on a page, then all of these User-defined cells will get copied to the page because they are referred to in the formulas of shape.

So, to calibrate the map (and indeed the whole Visio page), just two points are needed. Choose an easily recognisable feature on the map, such as a major road junction, and place an LL Marker shape.


Find the same feature in Bing Maps, right mouse click it to reveal the popup, and copy the Lat \ Lon text.


Paste the Lat / Lon text into the same named Shape Data row of the LL Marker shape in Visio, and change the Position to value = 1.


Then find another feature near the opposite corner of the map image, and copy its Lat / Lon text.


Paste the text again into a second LL Marker shape in the same position in Visio, and change the Position to 2.


Now, when any another LL Marker shapes are added, then they will automatically provide their Latitude and Longitude values


That is it. The whole Visio page is now calibrated to the map.

As proof, the LL Marker shape has a hyperlink to open Bing Maps ….


Bing Maps will be opened, and a marker dropped at the selected location:


Next time, I will use this calibrated map to drop data points in the correct locations automatically.

The example Visio 2013 document can be downloaded from

And Visio 2010- format from :


4 Responses to “Calibrating a Map in Visio”

  1. Surrogate™ Says:

    Hi David !
    Can you add this example in not Visio2013 format? Thank you !

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.


O365 and SharePoint

Simplify Tasks

Want to learn the simple way?

Paul Turley's SQL Server BI Blog

sharing my experiences with the Microsoft data platform, SQL Server BI, Data Modeling, SSAS Design, Power Pivot, Power BI, SSRS Advanced Design, Power BI, Dashboards & Visualization since 2009

John Goldsmith's visLog

be smart, be clear, be visual ...

Mo's blog

Personal views on Dynamics 365 for Operations and Technical Architecture.

Chris Webb's BI Blog

Microsoft Power BI, Analysis Services, MDX, DAX, M, Power Pivot and Power Query

Azure Solutions for Office 365, and more...

Rob Fahrni



Life with Visio and other Microsoft Toys!

Nilsandrey's Weblog

Just another weblog

Things that Should be Easy

Every so often (too often in the IT industry) I encounter things that should have been very easy to do but turned out to be far too complicated. My favorite topics include SharePoint, .Net development, and software architecture, especially distributed systems.

Visio Guy

Smart graphics for visual people

%d bloggers like this: