Define a layer from a related table

2971
8
Jump to solution
08-10-2015 01:44 AM
ChristopherJohnson1
Occasional Contributor II

Good morning.  I have created a map service from a basic map document and I have related a SQL table to the document.  I would like to plot information from the SQL table (locations of places) as points on the feature layer...as another layer.  Is this possible?

I have seen the examples of clicking on a point on a map and getting the related data.  I do not want that...I want to show all of the related data on the map at the same time.

Thanks...CJ

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Chris,

   You are correct 1:Many needs a relate and thus what you are wanting is not possible to my knowledge.

View solution in original post

0 Kudos
8 Replies
RobertScheitlin__GISP
MVP Emeritus

Christopher,

  If you SQL Table is a table that has XY values then you can create an XY Event layer or an Query Layer in ArcMap and then publish this mxd to ArcGIS Server so that the data can be used like a normal Spatial Layer.

0 Kudos
ChristopherJohnson1
Occasional Contributor II

Thanks for the reply, Robert.

That is exactly what I am trying to do.  I have added a query layer to the map document, related the standalone table to the layer in the document and published the document as a map service.  I am now trying to display the data from the standalone table/query layer, over the feature layer, using the JavaScript API.  All of the examples though, show obtaining related data on selection.  I just want to create another feature layer with that information. For example, I want to create a choropleth/thematic map and then overlay locations on top of that. Do you have any examples?

Thanks...Chris

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Chris,

   So your standalone table has not attributes like lat/Lon or X/Y that can be used to make it a Query layer on it's own? We are talking relates vs joins right? Normally you would see relate returned as in all the samples using a selection due to the one to many relationship of many relates.

0 Kudos
ChristopherJohnson1
Occasional Contributor II

The standalone table does have lat/long coordinates.  There is a 1:many relationship between the layer and the standalone table, however.  That is the reason that I use a relate versus a join, as I am under the impression that a join will only allow for a 1:1 mapping.

Thanks...Chris

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Chris,

   You are correct 1:Many needs a relate and thus what you are wanting is not possible to my knowledge.

0 Kudos
ChristopherJohnson1
Occasional Contributor II

Thank you, Robert.

As a follow-up, to do what I require, since the locations layer is pretty static, I would need to add it to the geodatabase/shapefile, correct?

Thanks...Chris

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Chris,

   That is what I would do.

ChristopherJohnson1
Occasional Contributor II

I really appreciate your help, Robert.  Thank you!

0 Kudos