google-code-export / geoxml

Automatically exported from code.google.com/p/geoxml
1 stars 1 forks source link

.Clear() stops JavaScript Function execution #6

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Go to http://www.tchdgis.org/googlemaps/mainEHservicenpl.html
2. Click "Layers On/Off"
3. Uncheck "Belleview East" (top row), Check "City Boundaries" (second row)
4. Click "Refresh Map"

What is the expected output? What do you see instead?
Refresh Map runs a Function called Refresh. After going through a series 
of alerts, the Belleview East polygons (green ones) should clear (This 
works), then the City Boundaries (dark blue) polygons should add. These do 
not. The function stops before these add. If you click "Refresh Map" 
again, they will add. My guess is that the code:

else if (Engrefresh=="R")  {
Engrefresh = "G";
alert("eng is cleared");
ENGOffice.clear(); }

stops the if statement execution - specifically the ENGOffice.clear(); 
call. If I move the code that adds (parses) the city boundaries before the 
ENGOffice.clear(); statement, both if statements run.  

What version of the product are you using? On what operating system?
geoxml3Feb2009.js on IE 7.0, XP

Please provide any additional information below.

Original issue reported on code.google.com by TriCount...@gmail.com on 17 Mar 2009 at 4:01

GoogleCodeExporter commented 9 years ago
UPDATE: This issue occurs even with the latest version of GeoXML: 
geoxml15Mar2009.js

Thank you.

Original comment by TriCount...@gmail.com on 17 Mar 2009 at 10:36

GoogleCodeExporter commented 9 years ago
Validate according to your list post you are not having this issue with the 
latest
version and I can flose this one right?

Original comment by lanceala...@gmail.com on 18 Mar 2009 at 2:58

GoogleCodeExporter commented 9 years ago
Clear empties GeoXml so you can reuse it for parsing "different" sources, it is 
not a
hide function calling parse on an empty GeoXml has undefined results.

Note the toggleContents call is useful for hiding and showing things within 
different
folders of the same kml, there is some eraticness however on order of load when
multiple different kml sources. I am adding an explicit hide and show method to 
the
GeoXml class which will hide and show all its content.

Original comment by lanceala...@gmail.com on 18 Mar 2009 at 4:54

GoogleCodeExporter commented 9 years ago
I removed a bit of "side bar" dependence from clear which I am assuming may be
responsible for the odd behavior ( ie the code was assuming a sidebar existed 
for the
instance and was attempting to clear it )

Original comment by lanceala...@gmail.com on 21 Mar 2009 at 5:42

GoogleCodeExporter commented 9 years ago
Closing

Original comment by lanceala...@gmail.com on 28 Apr 2009 at 2:55