- Issue created by @ekes
A normal configuration for 'geocode from file' is to enable GPX, KML, GeoJSON... providers. This module passes the providers and attempts to geocode with each in turn in a try/catch https://git.drupalcode.org/project/geocoder/-/blob/8.x-3.x/src/Geocoder....
The KML module specifically emits a warning on line https://github.com/itamair/geoPHP/blob/master/lib/adapters/KML.class.php... when it attempts to read a non XML file.
Warning: Attempt to read property "nodeName" on null in KML->geomFromXML() (line 94 of /app/vendor/itamair/geophp/lib/adapters/KML.class.php).
KML->geomFromXML() (Line: 66)
KML->geomFromText('{
"type": "featurecollection",
....
Problematic, but worse this warning continues to include the whole file. Which can be huge. So even if not rendered it's a memory suck.
Configure a geofield to be geocoded from a file. Enable geocoders including KML. Don't have KML as the last. Upload another format.
It would probably be more efficient already to call https://github.com/itamair/geoPHP/blob/master/geoPHP.inc#L228 before starting to attempt to read the files.
Agree approach. Make MR.
Active
3.0
Code