Can anyone point me to some sample code for a map display control (zoom in, zoom out, + slider) like Google Maps and all the other popular map programs use? I have already looked through the showcase apps and I can’t seem to find something like that. Maybe someone here has already suggested this, but I am relatively new and can’t seem to find it. Thank you in advance.
Use the GWT MapWidget.
Thanks, I’ll check this out. Are there any MapWidget examples on any of your showcase sites. I found the MapWidget API, but I would like to see a demo if any are available. Thanks again for your quick response.
Take any existing MapWidget sample, and just add the MapWidget to some SmartGWT component. There are a few other bits of sample code on the forums as well.
Just to clarify. Would I still need to use the MapWidget class even if I just wanted the map controls but not the map data (say zoom and drag on our image not a google map)? Or is there some other creative way to do that which I can’t figure out?? ![]()
Oh, no, no reason to use MapWidget in that case. Zooming for an image can be accomplished by just changing the size of the image (within a containing Canvas that has overflow:“hidden” to clip it). Drag panning just means implementing drag events that call setScrollLeft/Top() on the containing Canvas.
Thanks. That is very helpful to know.
I should have explained it a bit more precisely to begin with. Thanks again.