[mapguide-users] Re: Couple of (potential) bugs in MapGuide 2.1 API AjaxViewer

SandraH sahoerne at web.de
Tue Nov 2 11:58:37 EDT 2010


Hello Colin,

your post is quite a while ago, but I was able to solve one of your
problems.
If you call the Javascript Function ZoomToView, you aren't allow to pass
String-Variables. Insted you have to convert them to float-Values. 

After that everything works fine.
 
Code with error
 var XY = zoomtoView.split(';')
var x =  XY[1];
var y =  parseFloatXY[2];
var scale = XY[0];              
parent.parent.ZoomToView(x, y, scale, true);

Code without the error in FormatLocalizedDecimal 
var XY = zoomtoView.split(';')
var x =  parseFloat(XY[1]);
var y =  parseFloat(XY[2]);
var scale = parseFloat(XY[0]);
parent.parent.ZoomToView(x, y, scale, true);

I hope that helps everyone who had this error.

Sandra
-- 
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Couple-of-potential-bugs-in-MapGuide-2-1-API-AjaxViewer-tp2610344p5698028.html
Sent from the MapGuide Users mailing list archive at Nabble.com.


More information about the mapguide-users mailing list