Select to view content in your preferred language

Dynamic layer based on shapefile

1856
9
09-01-2014 05:18 AM
teresafazio
Deactivated User

I'm trying to add a dynamic layer, to my map, based on a shapefile.

I created a workspace as in the image

Shapefiles are store in subfolders inside folder specified for the workspace: i.e.

But if I try to request the datalayer, it seems arcgis server (10.1) doesn't find the shapefile:

Thanks in advance.

0 Kudos
9 Replies
RobertScheitlin__GISP
MVP Emeritus

Teresa,

   Does your ArcGIS Server account have read access to the \\rover\pkt305_DB\01_UserTemporaryUpload directory?

0 Kudos
teresafazio
Deactivated User

Yes.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Teresa,

  Also it looks like your JSON is not accurate:

{

     "id":"Chief_Ladiga",

     "source":{

          "datasource":{

               "type":"table",

               "dataSourceName":"Chief_Ladiga",

               "workspaceId":"MyShapefileWorkspaceID"

          }

          ,"type":"dataLayer"

     }

}

Notice you do not use the .shp in the dataSourceName.

0 Kudos
teresafazio
Deactivated User

The problem seems to be the subdirectory; if the shapefile is in the root directory (\\rover\pkt305_DB\01_UserTemporaryUpload) everything works fine, when I move it in a subfolder of the root folder, arcgis server generates error.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Teresa,

  Using a subfolder works for me:

{

    "id":"Chief_Ladiga",

    "source":{

          "datasource":{

              "type":"table",

              "dataSourceName":"folder1\\Chief_Ladiga",

              "workspaceId":"MyShapefileWorkspaceID"

          }

          ,"type":"dataLayer"

    }

}

0 Kudos
teresafazio
Deactivated User

Not for me, or rather the behavior is strange: if the shapefile is saved directly into the subfolder of the root folder, arcgis server returns the error message (Unable to find the specified 'datasourceName' in 'dataSource' for dynamic DataLayer with 'id' : -1.) ; but if I save the shapefile first in the root folder, and then move it into subfolder, everything works, or perhaps simply because the rest response is in the cache. Therefore I would ask you to try the first way. Thank you for availability.

Teresa

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Teresa,

  I see the same issue now with sub folders. Not sure what to tell you besides call Tech Support.

0 Kudos
teresafazio
Deactivated User

Thanks anyway.

Teresa.

0 Kudos
GeorgetaPopa
Emerging Contributor

Are the subfolders supported in newer versions? 

Did you find out something?

Thanks.

Geta

0 Kudos