How to put markers on maps
What you need
To take a set of addresses in Excel, where their latitude and longitude have already been geocoded, and plot them on Google Maps.
All Mapping activities, are controlled by 2 parameter sheets. One is general, and tells the procedures how to deal with the data returned from the various mapping providers (geoCodingParameters worksheet) and the other is specific to particular sets of data or desired results (in this case ‘step by step parameters’)
- Go to the step by Step MasterTab. This is where you enter the data to be placed on a map . You’ll find some example data that looks like this. The columns in Yellow were already completed in How to Geocode addresses using Google Maps, the latitude and longtitude would already have been calculated. Now you need to provide data in the orange columns, Namely a label – this will be what is shown when you mouseover the Google Maps Marker, and content – This will be what is shown when you click on the related marker. The example below calculates some appropriate html formatting in column D from other fields populated by the geoCoding process using this formul, but you should use whatever you want to show in the infoBubble
="<b>" & C2 & "</b><br>" & SUBSTITUTE(O2,",","<br>") & "<br>"
- Hit the markers button and a map will be shown like this. Click on a point and your data appears in a popup info box
No more steps. That’s all there is to it.
What just happened ?
The code associated with the markers button can be found in the GoogleMark module, and looks like this.
Public Sub stepByStepMarking() googleMarkingExample "Step by Step Parameters" End Sub
Read more about the detail of how all this works and walk through the source code at Mapping and adding markers to maps or see some more Step by Step Guides (see below).
In the meantime why not join our forum, follow the blog or follow me on twitter to ensure you get updates when they are available.
- How to add flightPaths on a Map
- How to add quickLinks to a Map
- How to control your vizMap application
- How to define your vizMap application – Dictionary
- How to define your vizMap Application – visualizations
- How to filter markers by Category
- How to Geocode addresses using Google Maps
- How to modify geocoding and mapping parameters
- How to Overlay circles on a Map
- How to prepare for your vizMap application – Data
- How to prepare for your VizMap application – Parameters
- How to use alternate Map icons