rcaguirreg / geoxml3

Automatically exported from code.google.com/p/geoxml3
0 stars 0 forks source link

'google.maps.Point' is null or not an object #79

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. set parserOptions.processStyles to false (according to the documentation, 
this avoids a google.maps dependency, see:
http://code.google.com/p/geoxml3/wiki/ParserReference)
2. invoke geoXML3.parser.parseKmlString()

What is the expected output? What do you see instead?
expected: successful parse
instead: 'google.maps.Point' is null or not an object (geoxml3.js r91 line 983)

What version of the product are you using? On what operating system?
geoxml3.js r91, MS-WinXP (IE8)

Please provide any additional information below.
the processStyleMap() call on line 499 (geoxml3.js r91) introduces a dependency 
on google.maps.Point(). This could be avoided by moving the call into the 
parserOptions.processStyles test scope a few lines down (line 502)

Original issue reported on code.google.com by erik.so...@humana-kleidersammlung.de on 1 Feb 2013 at 9:19

GoogleCodeExporter commented 9 years ago
Which branch of geoxml3 are you using?  Looks like it might be:
http://code.google.com/p/geoxml3/source/browse/branches/kmz/geoxml3.js

Do you have an example that exhibits the problem?
Do you have a patch?

Original comment by geocodezip on 1 Feb 2013 at 11:25

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Yes, I am using r91 from the 'kmz' branch.

I don't have an example ready, but the usecase involves calling 
geoXML3.fetchZIP().
Parsing the subsequent result triggers the problem.

I'm submitting a patch that solves the issue.
Notes:
 - the patch also exposes the 'render' method from the parser object
 - for the described usecase to work properly, the following (callback) properties need to be overridden:
   - parserOptions.createMarker
     parserOptions.createOverlay
     // *NOTE*: these are undocumented...
   - parserOptions.createPolygon
   - parserOptions.createPolyline

Original comment by erik.so...@humana-kleidersammlung.de on 1 Feb 2013 at 3:13

Attachments:

GoogleCodeExporter commented 9 years ago
applied patch, revision 92

Original comment by geocodezip on 2 Feb 2013 at 4:27

GoogleCodeExporter commented 9 years ago
please report any issues with the updated version.

Original comment by geocodezip on 2 Feb 2013 at 4:27

GoogleCodeExporter commented 9 years ago
Works fine. Would you mind merging the fix to the 'poly' branch ?

Original comment by erik.so...@humana-kleidersammlung.de on 5 Feb 2013 at 5:32

GoogleCodeExporter commented 9 years ago
Committed revision 93.

Original comment by geocodezip on 5 Feb 2013 at 6:23

GoogleCodeExporter commented 9 years ago
please consider merging the attached patch to r93 of the 'polys' branch.
This reduces more inherent google dependencies.

Original comment by erik.so...@humana-kleidersammlung.de on 25 Feb 2013 at 3:11

Attachments: