Closed anakaine closed 3 years ago
Proxy url must be passed as a separate parameter, as the below example:
// create a feature layer and add it to the map
var pedestrianDistricts = L.esri.featureLayer({
proxy: 'http://ipaddress/mapproxy/proxy.php',
url: 'https://serveraddress/arcgis/rest/services/name/FeatureServer/0'
}).addTo(map);
That's great, thanks
On Wed, 27 May 2020, 22:01 Ahmed Nour Eldeen, notifications@github.com wrote:
Proxy url must be passed as a separate parameter, as the below example:
// create a feature layer and add it to the map var pedestrianDistricts = L.esri.featureLayer({ proxy: 'http://ipaddress/mapproxy/proxy.php', url: 'https://serveraddress/arcgis/rest/services/name/FeatureServer/0' }).addTo(map);
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Esri/resource-proxy/issues/523#issuecomment-634612968, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABWLFS4V52PU3PKHIFXZ3KDRTT6IHANCNFSM4H25EMHA .
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you need additional assistance please contact Esri Technical Support. Thank you for your contributions.
This issue has been automatically closed due to inactivity. If you need additional assistance please contact Esri Technical Support.
A fresh install of PHP resource proxy with a fresh, simple ESRI-Leaflet map that works without error providing no proxy'd address is used. Once a feature service is used with the proxy the following error is returned. So far I've been unable to locate where the issue is arising from. The logical things like checking for duplicate or absent list elements, line terminations, etc, isn't giving me much joy.
The browser error in Chrome is:
Uncaught SyntaxError: Unexpected token } in JSON at position xxx
The returned line in question is:{"https://serveraddress/arcgis/rest/services/name/FeatureServer/0"}
The closing } is flagged as the source of the error.The layer is being called via:
The proxy.config looks like:
So far as I can tell theres no issue collecting the token. The console is free of other errors, and the log file looks like:
The php version of the script is: 1.1.2
From php-verification.php: Check PHP version 5.6 or newer? | Pass [v7.3.4] Check if directory is writable? | Pass Check for PDO Sqlite extension? | Pass Check for Curl? | Pass [v.7.61.1]