FW: [mapguide-users] Autoselect an object on Map start

Willem Schwarte willem at giskit.nl
Mon May 29 04:29:31 EDT 2006


I'm still having problems with this one... 



-----Oorspronkelijk bericht-----
Van: Willem Schwarte [mailto:willem at giskit.nl] 
Verzonden: vrijdag 12 mei 2006 11:31
Aan: users at mapguide.osgeo.org
Onderwerp: [mapguide-users] Autoselect an object on Map start

 <<deztatest.rar>> Hi,

What I'm trying to create is when the index.php is called, the map is
loaded, after loading the map, search for objects with HYPERLINK = s199,
select the objects.

I've created a script, with code from search.php (for the searchroutine
and selecting the objects).

Index.php is a frameset of 2 frames, the top is the ViewerFrame, the
bottom is called testframe. 

Testframe is initially loaded with wait.php which just waits until
mapInit is true, then reloads the testframe with autoSelect.php.

Autoselect.php will search for object with hyperlink=s199 and create a
XML. Prints the XML on screen, prints a link "199" with an OnClick to
CellClicked() function. Also auto executes the cellClicked function. 

Here's the strange thing:

When the CellClicked function is called automatically on loading the
page (i've build in a simple wait script to really be sure the map is
loaded), you will first get an messagebox with the generated XML of one
object. Click ok, now PHP will throw an error, on my system that is
anyway.

BUT... If you click on the link "199" , which executes the same
CellClicked function, the object will be selected on the map! 

Any idea how this can happen? If there is an easier way of doing this
please let me know. 

I've attached the shapefile I have used in this example, plus the 3 php
files used. 

I hope somebody can help me out with this one! Thanks...

Willem Schwarte
-------------- next part --------------
A non-text attachment was scrubbed...
Name: deztatest.rar
Type: application/octet-stream
Size: 33288 bytes
Desc: deztatest.rar
Url : http://lists.osgeo.org/pipermail/mapguide-users/attachments/20060529/2ffe1c7d/deztatest.obj
-------------- next part --------------
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe at mapguide.osgeo.org
For additional commands, e-mail: users-help at mapguide.osgeo.org


More information about the Mapguide-users mailing list