Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions geoPHP.inc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
// Adapters
include_once("lib/adapters/GeoAdapter.class.php"); // Abtract class
include_once("lib/adapters/GeoJSON.class.php");
include_once("lib/adapters/EsriJSON.class.php");
include_once("lib/adapters/WKT.class.php");
include_once("lib/adapters/EWKT.class.php");
include_once("lib/adapters/WKB.class.php");
Expand Down Expand Up @@ -97,6 +98,8 @@ class geoPHP
'ewkb' => 'EWKB',
'json' => 'GeoJSON',
'geojson' => 'GeoJSON',
'esrijson' => 'EsriJSON',
'arcgis' => 'EsriJSON',
'kml' => 'KML',
'gpx' => 'GPX',
'georss' => 'GeoRSS',
Expand Down Expand Up @@ -256,6 +259,9 @@ class geoPHP

// Detect GeoJSON - first char starts with {
if ($bytes[1] == 123) {
if (strpos($input, 'esri') !== FALSE) {
return 'esrijson';
}
return 'json';
}

Expand Down
Loading