Distributing Data Points Automatically on Maps in Visio

In my last article, I described how to calibrate a map in Visio ( see http://blog.bvisual.net/2015/05/26/calibrating-a-map-in-visio/ ), and in this article I use a calibrated map to distribute data points from a linked data source automatically.

For this example, I drew a simple shape at the size that I want, but you could add this smartness to any shape. All you need is an external data recordset that contains the Latitude and Longitude values that need to be linked to each data point.

image

I linked one sample row from the External Data window to the shape because this will automatically create some Shape Data rows.

image

It will usually automatically add some default data graphic text which can be edited to display whatever you want. I just want to see the Postcode District in this example.

image

So, my beautiful complex shape is almost ready….

image

All I need to do is add one User-defined cell, that I have called LLTrigger, so that the PinX and PinY of the shape can be set according to the Latitude and Longitude values.

image

The Value cell contains the following formula provided that the LL Marker shapes from the previous article are present on the page:

Cell Name Formula
User.LLTrigger =IF(AND(NOT(Prop._VisDM_Latitude=0),NOT(Prop._VisDM_Longitude)=0),SETF(GetRef(PinX),ThePage!User.LLPosition1X-((ThePage!User.LLPosition1Lon-Prop._VisDM_Longitude)/(ThePage!User.LLPosition1Lon-ThePage!User.LLPosition2Lon))*(ThePage!User.LLPosition1X-ThePage!User.LLPosition2X))+SETF(GetRef(PinY),ThePage!User.LLPosition1Y-((ThePage!User.LLPosition1Lat-Prop._VisDM_Latitude)/(ThePage!User.LLPosition1Lat-ThePage!User.LLPosition2Lat))*(ThePage!User.LLPosition1Y-ThePage!User.LLPosition2Y)),0)

As soon as the trigger formula is entered, the shape will automatically re-position itself at the correct location.

image

Also, if I want to have a hyperlink on each shape that opens Bing Maps at the precise co-ordinate, then I can add a new Hyperlink row as follows (see previous article):

image

Hyperlink.BingMaps.Address ="http://www.bing.com/maps/"
Hyperlink.BingMap.ExtraInfo ="lvl=11&sp=Point."&Prop._VisDM_Latitude&"_"&Prop._VisDM_Longitude&"_"&NAME()

Then I unlinked the shape from the row in the External Data window, and dragged the shape onto the Document Stencil, and renamed the master as Data Point.

image

Then, with the Data Point master selected in the Document Stencil, I can select as many rows as I wan to in the External Data window, and drag and drop them onto the map. All of the rows will be added as new shapes in the correct location on the map!

image

Every Data Point shape is placed according to its Latitude and Longitude values:

image

I called the master Data Point because it could have as many other Shape Data rows on them, and could be displaying  Data Graphic Icon Sets, Data Bars, Text Callouts and Color By Value … but that is for another day!

Visio 2013 sample : http://1drv.ms/1SBGWDw

Visio 2003-10 sample : http://1drv.ms/1Fa9U35

So, I can link a row from multiple External Data recordsets to these shapes, and edit the Data Graphics to display Post town using Color by Value, for example:

image

Visio 2013 example : http://1drv.ms/1Fiquis

Visio 2003-10 sample : http://1drv.ms/1Fiquis

3 Responses to “Distributing Data Points Automatically on Maps in Visio”

  1. Filter Visio External Data to Drop Shapes | bVisual - for people interested in Microsoft Visio Says:

    […] I have recently been demonstrating how to automatically drop data point shapes into the correct latitude longitude position over a map image in Visio, and in this instalment I show how to automatically filter the dropped data points by a rectangular area. This will only work after calibrating the map image as in my previous article http://blog.bvisual.net/2015/05/26/calibrating-a-map-in-visio/ and then using the Data Point shape (or similar) from http://blog.bvisual.net/2015/05/27/distributing-data-points-automatically-on-maps-in-visio/ […]

  2. Ridha Says:

    great work,
    plz a question, how did you make the picture fixed and look like a background, I tried in protection section but it didn’t looks like you did.

    thx


Leave a comment

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

Joanne C Klein

Compliance in Microsoft 365

JackBinnall

O365 and Power Platform

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 Fabric, Power BI, Analysis Services, DAX, M, MDX, Power Query, Power Pivot and Excel

davecra.wordpress.com/

Solutions for Microsoft Office, and more...

Rob Fahrni

I AM FAHRNI

john Visio MVP

Life with Visio and other Microsoft Toys!

Nilsandrey's Weblog

Just another WordPress.com 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