MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




displaydata map question visual basic

This is a discussion on displaydata map question visual basic within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; I have two questions related to displaydatamap. The following code populates the map with data from mappoint. I would like ...


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read



Click here to register

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-14-2005
Junior Member
White Belt
 
Join Date: Mar 2005
Posts: 8
displaydata map question visual basic

I have two questions related to displaydatamap. The following code populates the map with data from mappoint. I would like to populate the map using the same displaydatamap settings below but using data from an access database. I have two fields in the database, one for state and another for value.

1 Question - how do i populate the map using access data?
2 Question - Do i have to open the application in order to show the changed map? (i would like to display the changes in visual basic only)

Here is the code i have so far, it works with data from mappoint. However i would
like to insert my own from access and display in visual basic only. Any help would be grealty appreciated.

Sub CreateDiscreteRangesShadedAreaDataMap()
Dim objDataSet As MapPoint.DataSet
Dim objDataMap As MapPoint.DataMap
Dim objField As MapPoint.Field
Dim objApp As New MapPoint.Application
Dim lRangeValues(1 To 5) As Variant
Dim zRangeNames(1 To 4) As String
Dim lColorRange As Long
Dim szconn As String

objApp.Visible = True
objApp.UserControl = True
lRangeValues(1) = 0
lRangeValues(2) = 10000000
lRangeValues(3) = 20000000
lRangeValues(4) = 30000000
lRangeValues(5) = 40000000
zRangeNames(1) = "Low (< 10 million)"
zRangeNames(2) = "Medium (10 to 20 million)"
zRangeNames(3) = "High (20 to 30 million)"
zRangeNames(4) = "Really High (over 30 million)"
lColorRange = 15 'full spectrum

Set objDataSet = objApp.ActiveMap.DataSets.GetDemographics
Set objField = objDataSet.Fields("Population (2000)")

Set objDataMap = objDataSet.DisplayDataMap( _
geoDataMapTypeShadedArea, objField, _
geoShowByRegion2, geoCombineByDefault, _
geoRangeTypeDiscreteEqualRanges, _
geoRangeOrderDefault, _
lColorRange, 4, lRangeValues, zRangeNames)
objDataMap.LegendTitle = "States shaded by population"
End Sub
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
basic, displaydata, map, question, visual


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Visual Basic 6.0 Anonymous MapPoint 2006/2009 Discussion 1 08-06-2004 07:17 AM
Visual Basic 6.0 fantef MapPoint 2006/2009 Discussion 0 04-15-2004 12:41 PM
mappoint, visual c++ vs visual basic Anonymous MapPoint 2006/2009 Discussion 6 03-30-2004 10:17 PM
Visual Basic with Map Point Anonymous MapPoint 2006/2009 Discussion 1 10-10-2003 09:58 PM
Visual basic or visual c++ in mappoint misterb83 MapPoint 2006/2009 Discussion 1 02-14-2003 09:31 AM


All times are GMT -5. The time now is 07:56 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
MP2K Magazine
Visitor Map


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54