Values of area in rectangle

Matrices
11-13-2003, 08:29 AM
Is there a way of allowing a user to draw a rectangle on the map and obtain the longitude and latitude of each of its corners so that I can store values as user locations? Or is there an easier way of doing this, ie when a vehicle gets near a certain location, I can run a method to find the user location instead of finding the address?

Sorry if this is not making sense, I'm being given a headache by muppets in the office

Cheers

M

Eric Frost
11-13-2003, 12:16 PM
Matrices,

The Shape object has a Vertices property, this can be used to obtain the Location's of the corners. From there you can get the lat/lon using Gille's code (article 13).

I don't understand about the vehicle, I guess if you assume Cartesian coordinates you can say if currentx > cornerx1 and currentx < cornerx2 etc then you can tell if the current location is within the rectangle?

Eric

 
Web mp2kmag.com
mapforums.com