Hey
I have 2 questions, that I'm hoping you can help me with.
1. Is it posible to determine if a specific position is land or water
2. Is it posible to disable the mouse wheel zoom function Or just disable zoom
Hey
I have 2 questions, that I'm hoping you can help me with.
1. Is it posible to determine if a specific position is land or water
2. Is it posible to disable the mouse wheel zoom function Or just disable zoom
Check for land / disable zoom
AHTUNG
Great ideas, Dave!
1 - I'm embarassed I didn't think of that...
2 - A quick search (live.com, of course) brought up this page on trapping the mousewheel:
http://adomas.org/javascript-mouse-wheel/
<<UPDATE: after playing around with this, I can't get the page-level events to fire when the mouse is positioned over the map. Maybe I'm missing something there, but it looks like the map control takes precedence. I'll update again if I figure it out.>>
Malazar
Drummos
As Ronni and Caleb mentioned this produces a less than ideal user experience as the map zooms out to 6 and then back in to 7. I'd love to just disable the mouse wheel completely. I've tried the method described in http://adomas.org/javascript-mouse-wheel/ and had the same experience as Ronnie and Caleb.
Is anyone still working on this
Thanks,
Bart
nmacro
Yeah, I know it's not ideal. Maybe someone else on the forum has figured out a more elegant solution.
To lock all user interaction, in the LoadMap() method, set the last parameter to true:
map.LoadMap(new VELatLong(47,-111),14 ,'h' ,true);
Raptorix
1. You should be able to use the MapPoint web service method "GetLocationInfo" to figure out if a given location is over land or water given the "Entity" it returns. Not a built in VE function, but still pretty easy to use.
2. Can you trap the mouse wheel event at the page level in a page and cancel the bubble I'm not a Javascript guru, but I thought this might be possible
Regards,
Dave
perezd
Thank you very much.
Even though ot wasen't the answers I was hoping for :)
the 2.b soloution is also what I'm doing for the moment, but it does not give the best experience that the control zoom back when changed... How do I lock the map for all user interaction
su45937
1. Thank you Dave, I'll try using the getLoactionInfo, it seems to be just what i'm looking for :)
2. I have tryed to capture the mousewheel like the example caleb linked to, but It seems to only capture the events on the page and not in the VEmap object :(
I have also try using the onstartzoom where I get the event as a parameter, but I can't find a way to cancel the event... Do you know how to, or have a link to a page where all events a descriped
hye_heena
Hi Bart
I haven't got the time to work on it yet, so I'm still looking for a solution.
/Ronni
bk13
David pereira
1. No.
2. Not specifically. There are 2 things you can do:
a. You can lock the entire map so that no user interaction is possible.
b. You can set a global variable to the current map zoom level (var lvl = VEMap.GetZoomLevel();) when you first load the map, trap the onendzoom event, and in your event handler, set the map zoom level back to the global (VEMap.SetZoomLevel(lvl);).