How to Connect Data to a Map

4263
25
Jump to solution
02-09-2017 09:31 AM
WilliamMiller4
Occasional Contributor II

Hi,

I have a map service that holds a non-geographic table from a non-ArcGIS database. I need to connect that data to the map, so the properties can be highlighted, etc. There are fields in the table that match data in the map, such as account_number. How do I match the two so I can get each properties' coordinates or am I going about this wrong?

William

0 Kudos
25 Replies
RobertScheitlin__GISP
MVP Emeritus

Yes, I missed that.

0 Kudos
Drew
by
Occasional Contributor III

William,

Can you provide some details

  • What database are you using? (SQL, Oracle, other..)
  • Are the 2 tables in the same database?
  • Are you connecting with a database AND user that is registered  with your ArcGIS Server (as Robert mentioned)
  • Is this your own ArcGIS Server or and ArcGIS online/portal account? I just assumed AGS.
  • When you are in the process of publishing the service what errors do you see when you do an 'Analyse' ?

If I had to guess you have not registered the correct database connection with the server.
All participating tables in the view must be registered with ArcGIS Server

Drew

WilliamMiller4
Occasional Contributor II

Hi Drew,

Here are some more details:

  • The database is SQL.
  • The two tables are in the same database.
  • I don't know. The GIS director performed the operation. (I know very little about ArcMap, as I have never really had a chance to use it.)
  • This is being done on our ArcGIS Server.
  • The first time it was attempted, ArcMap just closed. The second time, I didn't have time to read the message on the screen.

The view of the two tables was published as a map service with a random layer, as it would not publish without a layer. I had shown the director your instructions on how to publish the table as a map document, but was told it needed to be a map service in order for me to access it.

William

0 Kudos
Drew
by
Occasional Contributor III

That is true. You would need a dummy map layer in the service to get the tables to publish.
You can see we have similar in our REST endpoint (Search_Tables)

Reading above is sounds like a 1 to many relationship and not a 1 to 1 .this changes things too...

thinking....

Now I am not 100% on this.... but you might be able to do a 'relate' on the table and then publish.

Once published you will want to look at the executeRelationshipQuery

  QueryTask | API Reference | ArcGIS API for JavaScript 3.19  

Drew

0 Kudos
WilliamMiller4
Occasional Contributor II

Hi Drew,

I think I'll have to write a web service due to the one to many relationship of the data.

Thank you for all your help though. I learned a lot!

William

0 Kudos
Drew
by
Occasional Contributor III

No problem.  A web service is just as good and may provide more flexibility down the road.

0 Kudos