Autoselect an object on Map start

Willem Schwarte willem at giskit.nl
Fri May 12 05:30:52 EDT 2006


 <<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: not available
Url : http://lists.osgeo.org/pipermail/mapguide_users/attachments/20060512/0147602f/deztatest.obj


More information about the Mapguide_users mailing list