If I open the page, and type "kerk" and press "zoek", I get a javascript error, "soort is not defined":

j=soort.length; //alert(j)

Try installing FireFox and Firebug to track the error.
(you need to define variables before using them).

Also, you split a string giving you an array of strings.
You then pass strings into the ZoomToView function.
Depending on how its processed, you will get really weird results, eg:

var xc = "5";
xc += 5;
alert(xc); //Shows "55", NOT "10"

Try using parseInt():

xc = parseInt(ar[0]);
yc = parseInt(ar[1]);


This mat have worked in previous versions, as they only used x/y to send to the server,
and then parsed the results.

Regards, Kenneth Skovhede, GEOGRAF A/S

On 02-02-2010 12:09, Rico van Driel wrote:

Hi List,

I have an search adres application that uses the ZoomToView function as mentioned below. In previous MGOS versions this function works fine. In MGOS 2.1 this function works also but after execution the standard functions from mapguide does work anymore. For example if you pan the map you will see a response from mapguide but the map will be blank.

function showAdres(value)

{

// alert(window.top.ViewerFrame.mapFrame.name);

 ar = value.split("-");

 xc = ar[0];

 yc = ar[1];

//  alert(xc);

 window.top.ViewerFrame.mapFrame.ZoomToView(xc,yc,500,true);

}

See for example http: http://213.154.241.184/sites/lochem/index2.php (type 'kerk' and press "zoek" button, select address from list. After zooming select for example the pan function and see what happens)

After zooming to a address. The image shown is correct. But if I look to the X, Y cooridinates shown left below, they are not correct.

On nable I can only find this post:

http://n2.nabble.com/Couple-of-potential-bugs-in-MapGuide-2-1-API-AjaxViewer-td2610344.html#a2610344

I tried adding the numberValue = numberValue - 0; line to the mainframe.templ file but this does not seem to work.

Annyone other suggestions?

met vriendelijke groet,

GIS/^kit /^ BV

Rico van Driel

GIS^kit BV
Postbus 489
3990 GG Houten

De Molen 15
3994 DA Houten

        


Tel:         030-6340430
Fax:        030-6342433

email: [email protected] <mailto:[email protected]>_
www: _http://www.giskit.nl <http://www.giskit.nl/>__ _


Op al onze aanbiedingen en overeenkomsten zijn de algemene voorwaarden van FENIT, gedeponeerd ter Griffie van de Arrondissementsrechtbank te Den Haag op 3 juni 2003 onder nummer 60/2003 van toepassing. Een exemplaar zenden wij u desgewenst kosteloos toe. <blocked::http://www.giskit.nl/>


_______________________________________________
mapguide-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapguide-users
_______________________________________________
mapguide-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapguide-users

Reply via email to