I have an Access report which lists a number of client locations. For each record in the report I'd like to add a map to the location. Any thoughts or samples on an easy way to do this.
Thanks
This is a discussion on Printing within the MapPoint Desktop Discussion forums, part of the Map Forums category; I have an Access report which lists a number of client locations. For each record in the report I'd like ...
I have an Access report which lists a number of client locations. For each record in the report I'd like to add a map to the location. Any thoughts or samples on an easy way to do this.
Thanks
Hi,
You dont describe exacly what you want, but just create a Location object for each lat/long pair, zoom in to the altitude you want (eg 1 is max zoom), et voila you have the map![]()
rgds, Wilfried Mestdagh
www.mestdagh.biz
www.comfortsoftware.be
www.expertsoftware.be
MapPoint coding demo
MapPoint 2011 available, buy now
I have a report which is basically a collection list. I contains a customer name and address. There might be as little as one customer or as many as 20 on the list. In addition to the name and address info I want to print a map of each customer on the list. I don't need a route between locations.
Hi,
This should have you started. You can also place a pushpin on that location to show more exact. Also the Goto() does only zoom a little. You can set Altitude to a low value for a better zoom.
Code:FindResults results = MP.ActiveMap.FindAddressResults(street, city, othercity, region, zip, country); if (results.ResultsQuality <= GeoFindResultsQuality.geoAmbiguousResults) foreach (object o in results) { Location loc = o as Location; if (loc != null) { loc.GoTo(); break;
rgds, Wilfried Mestdagh
www.mestdagh.biz
www.comfortsoftware.be
www.expertsoftware.be
MapPoint coding demo
MapPoint 2011 available, buy now
Wilfried
I assume that I add the MapPoint Activex control to my report, do I then add your sample code to the Open event of the report? Do you have a sample report I might be able to review or know a web site where I can find a sample.
Thanks
Hi,
Yes you have to add the activeX component to your form. open a map, and then you can go on with this code. You can ask any other programming problem on this forum. We are glad to help if needed![]()
rgds, Wilfried Mestdagh
www.mestdagh.biz
www.comfortsoftware.be
www.expertsoftware.be
MapPoint coding demo
MapPoint 2011 available, buy now
I added the MapInfo MapX V3 activex control to my report. I'm a little confused (ok, a lot) as to where I am placing the sample code you provided. Would it be the "ON OPEN" event or someplace else?
Thanks
Hi,
Ok, no problem. First of all you have to open a map with it. Then you can go to geocordinates and so. I cannot advice in VBA because I never used it, but there are some code samples in the help in VB witch whould you get going also. I give some examples in C#, so it will be no problem for you to translate in VBA I hope
To open a map:
if you have north americ map then the parameter should be GeoMapRegion.geoMapNorthAmerica;Code:try { MP.NewMap(GeoMapRegion.geoMapEurope); } catch (Exception ex) { // something wrong here, log the ex.Message }
The map should open. Then try with a button or so the other code I provided, to see where you going. If you have other doupts / questions just fire them here![]()
rgds, Wilfried Mestdagh
www.mestdagh.biz
www.comfortsoftware.be
www.expertsoftware.be
MapPoint coding demo
MapPoint 2011 available, buy now
There are currently 1 users browsing this thread. (0 members and 1 guests)