Need better graphic for map

  • Thread starter Thread starter Treebeard
  • Start date Start date
T

Treebeard

I want to create a map of a certain area of land. I want the map to look
just like the the area. I want to be able to click on a certain house, or
post office or building and have the program bring up information about that
object.

Up until now I've only done programs which just displayed rows in tables
etc.

Can anybody give me any suggestions as to where to start?

I would like it to look something like this seating diagram:

http://philadelphia.phillies.mlb.com/NASApp/mlb/phi/ballpark/cbp_seating_diagram.jsp

I like where the particular section highlights when you hold the mouse over
it.

If that is too ambitious then just a map with high-lightable objects would
be great.

I would appreciate any suggestions at all even stupid ones.

Thanks

Jack
 
One way to do some of this is to load an image of your map onto a form.
Then, using the mouse down event, as below, define areas of your image. The
X and Y coordinates are in twips. Instead of msgbox, you could set the
control tip text, or perform other stuff....

Private Sub Image4_MouseDown(Button As Integer, Shift As Integer, X As
Single, Y As Single)
'comment -this code responds with a msgbox if certain areas of the image are
clicked...
If Button = acLeftButton Then
Me!Text0 = X 'textboxes for demo - this helps you map out your xy
coordinates of your image.
Me!Text2 = Y ' comment
End If
If X < 1830 And (Y > 1425 And Y < 4335) Then
MsgBox "you clicked on House 1"
End If
If (X > 1830 And X < 3705) And (Y > 1425 And Y < 4335) Then
MsgBox "you clicked on House 2"
End If
If (X > 3705 And X < 6360) And (Y > 1425 And Y < 4335) Then
MsgBox "you clicked on House 3"
End If
If X > 6360 And (Y > 1425 And Y < 4335) Then
MsgBox "you clicked on House 4"
End If
End Sub

HTH
Damon
 
Damon

Thanks that helps.

Although I wanted to be able to turn the little objects different colors
depending on whether that buliding is being rented or not.

I guess I could break the image into little pieces and have two pieces for
each building , one with a blue color and one with a normal color and then
make each visible/invisible depending on the variables.

I still am not sure how I could draw irregular shapes. I would like my map
to look exactly like the original but it doesn't seem possible with access
because every object is a rectangle.

I think i'm going to have to go with little text boxes. The picture will
look funky but I don't see any other way to do it.

Unless anyone else has any ideas.

Jack
 
Treebeard said:
Damon

Thanks that helps.

Although I wanted to be able to turn the little objects different colors
depending on whether that buliding is being rented or not.

I guess I could break the image into little pieces and have two pieces for
each building , one with a blue color and one with a normal color and then
make each visible/invisible depending on the variables.

I still am not sure how I could draw irregular shapes. I would like my map
to look exactly like the original but it doesn't seem possible with access
because every object is a rectangle.

I think i'm going to have to go with little text boxes. The picture will
look funky but I don't see any other way to do it.

Unless anyone else has any ideas.

Jack
This is not something that Access will do with any elegance and free forms
will cause a lot of grief.
A seating diagram similar to an auditorium can be done but to do it right
involves several forms that are based on non relational tables. Each item
(seat) would be a field and code is needed to "relate" that field to a table
where the seat information is in a relational table.

Without knowing a lot about the use for the information, this is something
that could be done with a web page and JavaScript fairly easily
 
Jack,

Start with a blank form. Add an unbound object frame to the form. (See Help file
on how to use the unbound object frame.) You can then add a graphic from a file
or create your own from something like Microsoft Paint. Once you have the
graphic, next overlay the graphic with various sizes of transparent command
buttons. Name the buttons in some logical pattern. Lastly you will need to write
code for each button. Appropriately sizing the command butoons to various sizes,
the naming pattern and your code will give you the effecy you want.
 
Back
Top