[ka-Map-users] help with rubberzoom
echuc
qroomexico at yahoo.com.mx
Tue Nov 6 09:56:00 EST 2007
Hello.
I make a customize toolbar but the rubberzoom not finish, my code is:
<script type="text/javascript" src="getcjs.php?name=xhr.js,kaMap.js,kaTool.js,tools/rubberzoom/kaRubberZoom.js"></script>
<script type="text/javascript">
var myKaMap;
var myNav;
var myCanvas;
var myKaRubberZoom;
window.onload=function() {
myKaMap = new kaMap('mapDiv');
myKaMap.server = 'http://localhost/maps/';
myKaMap.initialize();
myNav = new kaNavigator(myKaMap);
myKaRubberZoom = new kaRubberZoom( myKaMap );
myNav.activate();
myCanvas = myKaMap.createDrawingCanvas(10);
}
function myZoomIn() {
myKaMap.zoomIn();
}
function myZoomOut() {
myKaMap.zoomOut();
}
/**
* getFullExtent
* ...
*/
function getFullExtent() {
var exStr = myKaMap.getCurrentMap().defaultExtents.toString();
var ex = myKaMap.getCurrentMap().defaultExtents;
myKaMap.zoomToExtents(ex[0],ex[1],ex[2],ex[3]);
}
/**
* switchMode
* ...
*/
function switchMode(id) {
if (id=='toolPan') {
myNav.activate();
} else if (id=='toolZoomRubber') {
myKaRubberZoom.activate();
} else {
myNav.activate();
}
}
</script></head>
<body>
....
<!-- my small toolbar -->
<img src="maps/images/full.png" onclick="getFullExtent()" alt="Full" /><span>Full</span>
<img id="toolPan" src="maps/images/pan.png" onclick="switchMode(this.id)" alt="Pan" /><span>Pan</span>
<img id="toolZoomRubber" src="maps/images/Rubberzoom.png" onclick="switchMode(this.id)" alt="Rubber Zoom" /><span>RubberZoom</span>
<img src="maps/imagenes/zoomin.png" onclick="myZoomIn()" alt="Zoom In" /><span>Zoom In</span></a>
<img src="maps/imagenes/zoomout.png" onclick="myZoomOut()" alt="Zoom Out" /><span>Zoom Out</span>
--------
My tools Full, Pan, Zoom in, Zoom out is ok, but Rubber zoom, it does not finish and it does not make the zoom, could you help me.
This is a basic and simple toolbar.
Thanks.
---------------------------------
Comparte video en la ventana de tus mensajes (y también tus fotos de Flickr).
Usa el nuevo Yahoo! Messenger versión Beta.
Visita http://mx.beta.messenger.yahoo.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/ka-map-users/attachments/20071106/9c4390b9/attachment.html
More information about the ka-Map-users
mailing list