geocodezip/geoxml3

Asian properties not included after KML parser completes

Opened this issue · 0 comments

We've been trying to debug an issue that has plagued our Asian clients who have properties mapped from USA to Europe along with China, Japan and other Asian countries. The problem is it will only show a certain subset of the total number of properties, cutting off the properties and zooming out the map to the maximum, making it unusable. We narrowed the problem to the line in geoxml3 where doc.internals.bounds is created and a call to union with docs.bounds sets the new boundary box. The union call doesn't work in every case. We ended up fixing the issue by setting doc.internals.bounds = doc.bounds directly, removing the call to union. I wanted to make sure your team was notified so if other end users have this issue as well and can't find a solution.

Replace:

if (!!doc.bounds) {
  doc.internals.bounds = doc.internals.bounds || new google.maps.LatLngBounds();
  doc.internals.bounds.union(doc.bounds); 
}

With:

if (!!doc.bounds) {
  doc.internals.bounds = doc.bounds
}