If no marker is provided and the zoom option is enabled, the map gets centered in 0,0 lat lang after parsing
Closed this issue · 4 comments
GoogleCodeExporter commented
What steps will reproduce the problem?
1. Set the kmlLayerOptions with a map and zoom as true, and
2. Create a kmlParser with this kmlLayerOptions.
3. Invoke parse function using an empty KML URL (i.e a URL that points to a KML
file with no points) as a parameter
What is the expected output? What do you see instead?
Nothing should happen, but the map is centered in the middle of the ocean
instead :-)
What version of the product are you using? On what operating system?
geoXML3.js
Please provide any additional information below.
Please find attached a patch that solves the problem (at least in my case)
Original issue reported on code.google.com by julian.m...@osoco.es
on 1 Aug 2012 at 4:32
Attachments:
GoogleCodeExporter commented
Original comment by geocodezip
on 1 Aug 2012 at 6:49
- Changed state: Accepted
- Added labels: Priority-Low
- Removed labels: Priority-Medium
GoogleCodeExporter commented
Is this a realistic use case? Why would you want to display a kml file with no
placemarks in it? And if there aren't any placemarks, why does it matter where
it zooms?
Original comment by geocodezip
on 1 Aug 2012 at 8:11
GoogleCodeExporter commented
In my own case, the kml file is generated dinamically depending some filters
that the client can introduce on the application. When the client add more
filters, some markers dissapears, but the geoposition is the same.
Eventually, when client introduces one filter that trigger all makers to
dissapear,
the geoposition changes to the pacific ocean, and the map only show water.
This only occurs if zoom is set as true. If it's false, the geopositon is
always the same.
Is for this that i think that if no markers are provided at the kml, is better
don't do anything with the geoposition.
Regards
Original comment by julian.m...@osoco.es
on 1 Aug 2012 at 10:17
GoogleCodeExporter commented
Fixed revision 86 (polys), revision 87 (kmz)
Original comment by geocodezip
on 4 Aug 2012 at 3:17
- Changed state: Fixed