Take the 2-minute tour ×

I've been trying to add a buffer function into an ongoing project that uses the arcgis server link for google maps here.

I am able to draw the buffer out on the map, however, when I try to implement the query for the buffer (With proxy.ashx) and all, the proxy loads okay according to firebug, but they returns an error, "Error: Error Code 0" and nothing else. I am kinda stuck now because of this.

I am not sure if I did the proxy config file wrong or is it the codes. I am currently using the layer's query from the link above as an reference on how to query via a buffer, by indicating a spatial filter which is the buffer itself.

Here are the codes:

var layer = overlayObjects['ls'].getMapService().getLayer(0);

var params = {
    geometry: buffers,
    geometryType: "esriGeometryPolygon",
    where:" ",
    spatialRelationship: "CONTAINS",
    returnGeometry: true        

layer.query(params, function(resultSet){...}

The error occurs at the layer.query() method.

My proxy config file:

<ProxyConfig mustMatch="true">
<!-- serverUrl options:
        url = location of the ArcGIS Server, either specific URL or stem
        matchAll = true to forward any request beginning with the url
        token = (optional) token to include for secured service
        dynamicToken = if true, gets token dynamically with username and
          password stored in web.config file's appSettings section.

<serverUrl url="http://*mapserverlink*/ArcGIS/rest/services/"


Due to some security reasons, I am not sure if I should place the server url here. Regardless, the serverUrl is not secured, so I do not think a token is necessary.

Also.. Is it because the buffers object I used not an overlayView object? As stated in the queryOptions class reference. My buffering is mostly the same as the one in the examples in the link above. I have tested using the Geometry I got from the buffer and place it into the mapserver's query service, and received an array of records back, but not for the javascript.

Any help with this would be appreciated..

share|improve this question
Question has nothing to do with the Google Maps API V3. –  Marcelo Sep 12 '12 at 8:26

1 Answer 1

Sorry about placing google maps api v3 in, as I thought it is included on the api reference I am looking at. I've managed to figure out what's wrong with the error code 0. I've read through the arcgislink.js that is in the project and saw that the code 0 comes from a status code from the XMLHTTPRequest. After some configurations with the server, its working now..

share|improve this answer

Your Answer


