Community of MapPoint and Bing Maps Users and Developers
This is a discussion on Developing with MapPoint and Excel - Getting Started within the MP2K Magazine Articles forums, part of the Map Forums category; For those interested in leveraging Excel and/or VBA with MapPoint, I have a new reference out titled "Excel Basics to ...
| |||||||
| Today's Posts | Twitter Feed | Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Re: Developing with MapPoint and Excel - Getting Started For those interested in leveraging Excel and/or VBA with MapPoint, I have a new reference out titled "Excel Basics to Blackbelt" (Cambridge Press 2008 ). Lot's of tricks to make use of. I've made a number of applications that integrate MapPoint with other apps through Excel and VBA as well. Here's a video link to a redux of a Webinar I gave for both Palisades and Cox Communication recently: The text is currently available at a promotional discount at Amazon.com Enjoy
__________________ http://www.amazon.com/Excel-Basics-B.../dp/0521889057 Last edited by Eric Frost; 09-20-2008 at 01:49 PM.. |
| |||
| Re: Developing with MapPoint and Excel - Getting Started
I hope someone is still viewing this thread. I need some help. I do not have a lot of knowledge of VB or any programing language. What I want to do is edit the script on this page MapPoint VBA Tutorial, Vista Gadgets, Web Site Visitors Map, MapPoint GPS API, more to use Latitude and Longitude instead of the address. Thank you for any help. |
| |||
| Re: Developing with MapPoint and Excel - Getting Started
Sure, here is the code: Code:
Dim objMap As MapPoint.Map
Private Sub Begin_Click()
Dim objFindResults As MapPoint.FindResults
Dim objLoc As MapPoint.Location
Dim objPushpin As MapPoint.Pushpin
Set oApp = CreateObject("MapPoint.Application.NA")
Set objMap = oApp.NewMap
Dim nCurrentRow As Integer
nCurrentRow = 6
szLatitude = Cells(nCurrentRow, 3)
Do While (szLatitude <> 0)
szName = Cells(nCurrentRow, 2)
If szName = 0 Then
szName = nCurrentRow - 11
End If
szLongitude = Cells(nCurrentRow, 4)
nRadius = Cells(nCurrentRow, 7)
Set objLoc = objMap.GetLocation(szLatitude, szLongitude)
Set objPushpin = objMap.AddPushpin(objLoc, szName)
' draws circle based on radius in column G
objMap.Shapes.AddShape geoShapeRadius, objLoc, nRadius, nRadius
' pop up pushpin name
objPushpin.BalloonState = geoDisplayName
nCurrentRow = nCurrentRow + 1
szLatitude = Cells(nCurrentRow, 3)
Loop
objMap.Saved = True
oApp.Visible = True
objMap.DataSets.ZoomTo
' change all pushpins to small red circle
objMap.DataSets(1).Symbol = 25
objMap.Altitude = objMap.Altitude * 1 'adjust altitude if desired
Exit Sub
The trick is to use the GetLocation method.. Also the spreadsheet with the modified code is attached. hope this helps! Eric
__________________ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ![]() Contribute and Learn at our New MapPoint and Virtual Earth Wiki - http://www.MapElves.com . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ![]() |
| |||
| Re: Developing with MapPoint and Excel - Getting Started
It worked exactly as hoped. What I am doing is creating coverage maps that show radius distances from 800 plus points. Doing them individually is quite time consuming. I am curious why it does not give the actual radius. It takes the number provided, say 50 miles, and it returns a 24.8 mile radius circle on the map. It looks like it is returning the diameter of the circle instead of a radius. There is an easy enough work around and I set up my spreadsheet to compensate for this I just wanted to understand why. Another question, if you do not mind - Is there a way to code this to work with a map that is already opened instead of opening a new one every time? Thank you again for your help. |
| |||
| Re: Developing with MapPoint and Excel - Getting Started
Hi, I have read the installment of how to create a macro that opens MapPoint and plots an address. Can anyone help me with the following; instead of opening a new map can an existing mappoint map that has been embedded in the the same excel work book be referenced instead? Any help on this will be greatly appreciated. Many thanks Arran |
![]() |
| Tags |
| developing, excel, mappoint, started |
| ||||
| Posted By | For | Type | Date | |
| MapPoint VBA Tutorial, Vista Gadgets, Web Site Visitors Map, MapPoint GPS API, more | This thread | Refback | 04-18-2007 03:14 PM | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| addpushpin - need help to get started | BWard | MapPoint Desktop Discussion | 7 | 12-19-2005 02:15 PM |
| Getting Started with the Virtual Earth Map Control | Eric Frost | MP2K Magazine Articles | 0 | 08-02-2005 03:39 PM |
| Getting Started with VB6 and MapPoint 2004 | takk | MapPoint Desktop Discussion | 3 | 12-08-2004 02:20 PM |
| I am developing an application using Mappoint web .... | Anonymous | MapPoint Desktop Discussion | 0 | 08-02-2002 07:11 AM |
| I am developing an application using Mappoint web .... | Anonymous | MapPoint Desktop Discussion | 0 | 12-31-1969 06:48 PM |