Dynamic Map Service from ArcGIS Online?

5949
9
06-08-2012 11:39 AM
maryandrews
New Contributor III
Let me first admit that I have just returned from a lengthy vacation so I'm a little rusty.

I have created a "map service" via ArcGIS Online and would now like to consume them via one of the samples for Java Script.

I have a feature service id http://services.arcgis.com/yygmGNIVQrHqSELP/arcgis/rest/services/LagunaLakeCommemorativeTrees/Featur...

Can I use this as my Dynamic Map Service Layer in this line of code?  I know I'm missing something just not sure what?

 var censusMapLayer = new esri.layers.ArcGISDynamicMapServiceLayer("http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer"
0 Kudos
9 Replies
derekswingley1
Frequent Contributor
Your link is to a feature service. You can use it in your app via esri.layers.FeatureLayer.
0 Kudos
akpagaakpaga
New Contributor
So you want to use the map service or the feature service of it..

If You want  the map service then your line of code is good but if its feature service you are looking add then  you need to change it to a feature layer and not Dynamic layer.
0 Kudos
maryandrews
New Contributor III
Thanks for responding.

I'm still a bit confused/frustrated.  I would like to create a service via ArcGIS Online hosting that I can then use in a web map that will allowing searching for a feature based on some value in my table.

It doesn't look like there is a prefab ArcOnline web template with Search capability. (Which seems strange, isn't this one of the most common things to do?)  No problem, I thought, I'll just use one of the JavaScript samples (I'm not a competent programmer, rather a cutter, paster, scripter). 

The problem  is the only service ArcGIS online is creating is a feature service.  This apparently can't be used as a dynamic service??  And there is no code examples for using the find function with a feature service (unless I missed it).

Funny to say but I missing the good old days of ArcIMS.

Any advice is greatly appreciated.

Thank!
0 Kudos
MatejTacer
New Contributor III
Nobody actually answered the question:
Is it possible to create a ArcGISDynamicMapServiceLayer from map service published from ArcGIS Online?

Thanks,
0 Kudos
StephenLead
Regular Contributor III
Nobody actually answered the question:
Is it possible to create a ArcGISDynamicMapServiceLayer from map service published from ArcGIS Online?

Thanks,


I believe the answer is no. AFAIK, ArcGIS Online only supports Tiled or Feature layers, and not Dynamic. The help file lists:

0 Kudos
AbhijatC
New Contributor III
Nobody actually answered the question:
Is it possible to create a ArcGISDynamicMapServiceLayer from map service published from ArcGIS Online?

Thanks,



I had used a map service published through ArcGIS Server as a dynamic service (in Flex). Kindly refer to the url :

http://www.abhijat-innovations.blogspot.in/2012/06/creating-arcgis-map-service.html

Hope it helps.

Abhy
0 Kudos
StephenLead
Regular Contributor III
Hi Abhy,

This question is related to the hosted service provided by Esri at ArcGIS.com - this doesn't have the same capabilities as running your own ArcGIS Server locally.

Steve
0 Kudos
AbhijatC
New Contributor III
Thanks Steve for the correction. Sorry I missed that.
Then it that case, your earlier reply should satisfy the question.


Abhy
0 Kudos
ZahidChaudhry
Occasional Contributor III
Thanks for responding.

I'm still a bit confused/frustrated.  I would like to create a service via ArcGIS Online hosting that I can then use in a web map that will allowing searching for a feature based on some value in my table.

It doesn't look like there is a prefab ArcOnline web template with Search capability. (Which seems strange, isn't this one of the most common things to do?)  No problem, I thought, I'll just use one of the JavaScript samples (I'm not a competent programmer, rather a cutter, paster, scripter). 

The problem  is the only service ArcGIS online is creating is a feature service.  This apparently can't be used as a dynamic service??  And there is no code examples for using the find function with a feature service (unless I missed it).

Funny to say but I missing the good old days of ArcIMS.

Any advice is greatly appreciated.

Thank!


it doesnt matter where services are hosted, you can do query on any layer...something like this
[HTML]http://services.myserver.com/ERmEceOGq5cHrItq/ArcGIS/rest/services/PoolPermits/FeatureServer/query?l...{"0":"Has_Pool=1 AND Pool_Permit=1","1":"Has_Pool=1 AND Pool_Permit=1"}&returnGeometry=true&f=html
[/HTML]

Look at rest APi...@

http://services1.arcgis.com/help/index.html?serviceCatalog.html
0 Kudos