Classbreaksrenderer with function and dynamicmaplayer

920
5
Jump to solution
09-20-2018 05:42 PM
RaviPavuluri
New Contributor II

Hi, I currenlty have classbreaksrenderer that uses a function to symbolize a featurelayer. I am trying to do the same with a dynamicmapservicelayer instead of featurelayer. I am getting an error "Error: Invalid renderer specified for dynamic mapLayer with 'mapLayerId': 2.". I understand that it is applying symbology feature by feature for featurelayer and this is not working with dynamicmapservicelayer. Is there another equivalent renderer for dynamicmapservicelayer where a function can be applied?

Background: I currently have an application where I symbolize featurelayer using classbreaksrenderer applying a function. The number of line features increased to ~60k and the application has started to have performance issues. I am trying to change it to a dynamicmaplayer to see whether it solves the problem.

For some reason all esri jsapi versions greater than 3.14 are broken for this example.

Renderer using a function | ArcGIS API for JavaScript 3.25 

I modified this example to try dynamicmapservicelayer. Please see code attached.

Thanks!

0 Kudos
1 Solution

Accepted Solutions
RaviPavuluri
New Contributor II

Hi Robert,

Thanks for your reply. I figured the issue myself. The issue was the database connection string. ArcGIS Server has client connection string and publisher connection string as separate for any database/fgdb that needs to be registered. This is not the case with dynamic workspaces. Both client and publisher connection string should be the same and there is no option to modify this. So, I made a common connection string that works from both client and server and the workspace works. So, the following worked for me with proper connection string.

"dataSourceName": "ColumnName",

Thanks,

Ravi.

View solution in original post

0 Kudos
5 Replies
RobertScheitlin__GISP
MVP Emeritus
0 Kudos
RaviPavuluri
New Contributor II

Hi Robert,

Thanks for pointing to the link. Looks like there is no way with using a function using webgl(featurelayer) or classbreaksrederer(dynamicMapServiceLayer). Do you have any other recommendations for handling ~60k line features with calculated symbology on the client side?

Thanks!

0 Kudos
RaviPavuluri
New Contributor II

Hi Robert,

I am trying to see if DynamicWorkspaces will be useful in my case. I am not able to get the correct syntax for using database table as right table source. I have this DB added as a dynamic workspace via catalog.

I saw your other reply from How can I add attributes to a feature class? 

Here is my syntax for dynamiclayer trying directly from rest console. I am getting "Unable to find the specified 'dataSourceName' in 'dataSource' for dynamic dataLayer with 'id': -1." error.

{
"source": {
"dataSource": {
"dataSourceName": "MYDatabase.DBUser.ColumnName", //does not work.

//"dataSourceName": "MYDatabase.dbo.ColumnName", //does not work.

//"dataSourceName": "sde.dbo.ColumnName", //does not work.

//"dataSourceName": "MyWorkspaceName.dbo.ColumnName", //does not work.
"workspaceId": "MyWorkspaceName",
"type": "table"
},
"type": "dataLayer"
}
}

Do you have any suggestions? Also, is there a way to just list datasourcenames from the dynamic workspace?

Thanks!

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Ravi,

  I do not work with DynamicWorkspaces so I can not offer any help there.

0 Kudos
RaviPavuluri
New Contributor II

Hi Robert,

Thanks for your reply. I figured the issue myself. The issue was the database connection string. ArcGIS Server has client connection string and publisher connection string as separate for any database/fgdb that needs to be registered. This is not the case with dynamic workspaces. Both client and publisher connection string should be the same and there is no option to modify this. So, I made a common connection string that works from both client and server and the workspace works. So, the following worked for me with proper connection string.

"dataSourceName": "ColumnName",

Thanks,

Ravi.

0 Kudos