Load One Layer from ArcGIS Server MapServer Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?Add an individual layer from ArcGISDynamicMapServiceLayer to the mapGetting mapserver url from ArcGIS Server?URL “ http:// <mygisServer>/ArcGIS/rest/service/GPTask/MapServer/jobs/<jobid>” not found in the ArcGIS Server?Mouse click event used gis application with much dataUsing Specific MapServer with ArcGIS for Server?Publish World topographic map to arcgis serverUsing ArcGIS Server WMS with OpenLayers 3?How can I use map service ( published on Arcgis Server 10.4.1) from another computer?Load ArcGIS Server layers into web using ArcGISDynamicMapServiceLayer JavaScript APIParameters for ArcGIS REST “…/MapServer?f=jsapi”?Cannot load MapService from ArcGIS Server in Javascript API
Sci-Fi book where patients in a coma ward all live in a subconscious world linked together
What is the meaning of the new sigil in Game of Thrones Season 8 intro?
Why are there no cargo aircraft with "flying wing" design?
Single word antonym of "flightless"
How come Sam didn't become Lord of Horn Hill?
Identify plant with long narrow paired leaves and reddish stems
How do I stop a creek from eroding my steep embankment?
How to deal with a team lead who never gives me credit?
Denied boarding although I have proper visa and documentation. To whom should I make a complaint?
What does an IRS interview request entail when called in to verify expenses for a sole proprietor small business?
Check which numbers satisfy the condition [A*B*C = A! + B! + C!]
Using audio cues to encourage good posture
In predicate logic, does existential quantification (∃) include universal quantification (∀), i.e. can 'some' imply 'all'?
Can a non-EU citizen traveling with me come with me through the EU passport line?
Why do people hide their license plates in the EU?
What does this icon in iOS Stardew Valley mean?
List *all* the tuples!
Is the Standard Deduction better than Itemized when both are the same amount?
Overriding an object in memory with placement new
What is the role of the transistor and diode in a soft start circuit?
What would be the ideal power source for a cybernetic eye?
How to find all the available tools in mac terminal?
prime numbers and expressing non-prime numbers
English words in a non-english sci-fi novel
Load One Layer from ArcGIS Server MapServer
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
Announcing the arrival of Valued Associate #679: Cesar Manara
Unicorn Meta Zoo #1: Why another podcast?Add an individual layer from ArcGISDynamicMapServiceLayer to the mapGetting mapserver url from ArcGIS Server?URL “ http:// <mygisServer>/ArcGIS/rest/service/GPTask/MapServer/jobs/<jobid>” not found in the ArcGIS Server?Mouse click event used gis application with much dataUsing Specific MapServer with ArcGIS for Server?Publish World topographic map to arcgis serverUsing ArcGIS Server WMS with OpenLayers 3?How can I use map service ( published on Arcgis Server 10.4.1) from another computer?Load ArcGIS Server layers into web using ArcGISDynamicMapServiceLayer JavaScript APIParameters for ArcGIS REST “…/MapServer?f=jsapi”?Cannot load MapService from ArcGIS Server in Javascript API
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I am pretty new to ArcGIS Server and am building a map applications using the Javascript API. I can easily load the map layer below by adding it as a ArcGISDynamicMapServiceLayer
http://www.parkcounty.org/ArcGIS/rest/services/Roads_Map/MapServer/
As you can see there are many layers as part of the above url. What if I just want to load the roads layer as a ArcGISDynamicMapServiceLayer? I've tried replacing the above url with the road specific URL below and that does not seem to work
http://www.parkcounty.org/ArcGIS/rest/services/Roads_Map/MapServer//2
Is there something else I can do as the front end developer or is it up to those that are hosting and managing the server to create a unique url for the roads?
arcgis-server javascript arcgis-javascript-api
add a comment |
I am pretty new to ArcGIS Server and am building a map applications using the Javascript API. I can easily load the map layer below by adding it as a ArcGISDynamicMapServiceLayer
http://www.parkcounty.org/ArcGIS/rest/services/Roads_Map/MapServer/
As you can see there are many layers as part of the above url. What if I just want to load the roads layer as a ArcGISDynamicMapServiceLayer? I've tried replacing the above url with the road specific URL below and that does not seem to work
http://www.parkcounty.org/ArcGIS/rest/services/Roads_Map/MapServer//2
Is there something else I can do as the front end developer or is it up to those that are hosting and managing the server to create a unique url for the roads?
arcgis-server javascript arcgis-javascript-api
add a comment |
I am pretty new to ArcGIS Server and am building a map applications using the Javascript API. I can easily load the map layer below by adding it as a ArcGISDynamicMapServiceLayer
http://www.parkcounty.org/ArcGIS/rest/services/Roads_Map/MapServer/
As you can see there are many layers as part of the above url. What if I just want to load the roads layer as a ArcGISDynamicMapServiceLayer? I've tried replacing the above url with the road specific URL below and that does not seem to work
http://www.parkcounty.org/ArcGIS/rest/services/Roads_Map/MapServer//2
Is there something else I can do as the front end developer or is it up to those that are hosting and managing the server to create a unique url for the roads?
arcgis-server javascript arcgis-javascript-api
I am pretty new to ArcGIS Server and am building a map applications using the Javascript API. I can easily load the map layer below by adding it as a ArcGISDynamicMapServiceLayer
http://www.parkcounty.org/ArcGIS/rest/services/Roads_Map/MapServer/
As you can see there are many layers as part of the above url. What if I just want to load the roads layer as a ArcGISDynamicMapServiceLayer? I've tried replacing the above url with the road specific URL below and that does not seem to work
http://www.parkcounty.org/ArcGIS/rest/services/Roads_Map/MapServer//2
Is there something else I can do as the front end developer or is it up to those that are hosting and managing the server to create a unique url for the roads?
arcgis-server javascript arcgis-javascript-api
arcgis-server javascript arcgis-javascript-api
asked Oct 29 '12 at 20:23
jotamonjotamon
7121637
7121637
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
Make use of the layers
property when asking for the exportmap
operation from a dynamic map service.
REST API Help on Exportmap operation.
e.g.
This service was published with 3 visible layers.
However, can make a request for certain layers.
- show: Only the layers specified in this list will be exported.
- hide: All layers except those specified in this list will be exported.
- include: In addition to the layers exported by default, the layers
specified in this list will be exported. - exclude: The layers exported by default excluding those specified in this list will be exported.
http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StateCityHighway_USA/MapServer/export?layers=show:2
Also take a look at what additional behaviour you can do with the use of dynamic layers.
I'm not sure if this really answers the OP question. The example above exports an image from the map service layer, though.
– Matej
May 15 '14 at 21:23
add a comment |
I know that this is an old question and already has an accepted answer. However, the answer goes over exporting the layer as an image. It doesn't seem to answer the OP's question. Because this is the first question that showed up when I was looking up this problem, I felt that I would add my solution here for others to try.
I first created a new ArcGISDynamicMapServiceLayer
with the MapServer's URL, then used the .setVisibleLayers
function to denote which layers in the MapServer should be displayed.
I can't use the OP's example MapServer because it has been taken down. But lets use esri's state, city, highway layer as an example. If I only want to show the highways on the map:
var newLayer = new ArcGISDynamicMapServiceLayer('http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StateCityHighway_USA/MapServer');
var layerIds = [0];
newLayer.setVisibleLayers(layerIds);
map.addLayer(newLayer);
If I wanted to show highways and states, then I would just replace the [0] with [0, 2].
add a comment |
Check out the ESRI API Reference Page for DynamicMapServiceLayer. I believe you will want to incorporate setVisibleLayers into your code.
I am not going to be managing the server for this project, just building the front-end. For easier management in the future would it make more sense for all the map layers to be setup/organized differently on the backend? Eventually I will build the front end to give users controls of many layers visibility, opacity etc.
– jotamon
Oct 29 '12 at 21:00
Hi Craig, the link seems to be dead?
– bummi
Apr 9 at 18:51
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "79"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f37828%2fload-one-layer-from-arcgis-server-mapserver%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
Make use of the layers
property when asking for the exportmap
operation from a dynamic map service.
REST API Help on Exportmap operation.
e.g.
This service was published with 3 visible layers.
However, can make a request for certain layers.
- show: Only the layers specified in this list will be exported.
- hide: All layers except those specified in this list will be exported.
- include: In addition to the layers exported by default, the layers
specified in this list will be exported. - exclude: The layers exported by default excluding those specified in this list will be exported.
http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StateCityHighway_USA/MapServer/export?layers=show:2
Also take a look at what additional behaviour you can do with the use of dynamic layers.
I'm not sure if this really answers the OP question. The example above exports an image from the map service layer, though.
– Matej
May 15 '14 at 21:23
add a comment |
Make use of the layers
property when asking for the exportmap
operation from a dynamic map service.
REST API Help on Exportmap operation.
e.g.
This service was published with 3 visible layers.
However, can make a request for certain layers.
- show: Only the layers specified in this list will be exported.
- hide: All layers except those specified in this list will be exported.
- include: In addition to the layers exported by default, the layers
specified in this list will be exported. - exclude: The layers exported by default excluding those specified in this list will be exported.
http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StateCityHighway_USA/MapServer/export?layers=show:2
Also take a look at what additional behaviour you can do with the use of dynamic layers.
I'm not sure if this really answers the OP question. The example above exports an image from the map service layer, though.
– Matej
May 15 '14 at 21:23
add a comment |
Make use of the layers
property when asking for the exportmap
operation from a dynamic map service.
REST API Help on Exportmap operation.
e.g.
This service was published with 3 visible layers.
However, can make a request for certain layers.
- show: Only the layers specified in this list will be exported.
- hide: All layers except those specified in this list will be exported.
- include: In addition to the layers exported by default, the layers
specified in this list will be exported. - exclude: The layers exported by default excluding those specified in this list will be exported.
http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StateCityHighway_USA/MapServer/export?layers=show:2
Also take a look at what additional behaviour you can do with the use of dynamic layers.
Make use of the layers
property when asking for the exportmap
operation from a dynamic map service.
REST API Help on Exportmap operation.
e.g.
This service was published with 3 visible layers.
However, can make a request for certain layers.
- show: Only the layers specified in this list will be exported.
- hide: All layers except those specified in this list will be exported.
- include: In addition to the layers exported by default, the layers
specified in this list will be exported. - exclude: The layers exported by default excluding those specified in this list will be exported.
http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StateCityHighway_USA/MapServer/export?layers=show:2
Also take a look at what additional behaviour you can do with the use of dynamic layers.
answered Nov 1 '12 at 0:46
SimonSimon
7,95764288
7,95764288
I'm not sure if this really answers the OP question. The example above exports an image from the map service layer, though.
– Matej
May 15 '14 at 21:23
add a comment |
I'm not sure if this really answers the OP question. The example above exports an image from the map service layer, though.
– Matej
May 15 '14 at 21:23
I'm not sure if this really answers the OP question. The example above exports an image from the map service layer, though.
– Matej
May 15 '14 at 21:23
I'm not sure if this really answers the OP question. The example above exports an image from the map service layer, though.
– Matej
May 15 '14 at 21:23
add a comment |
I know that this is an old question and already has an accepted answer. However, the answer goes over exporting the layer as an image. It doesn't seem to answer the OP's question. Because this is the first question that showed up when I was looking up this problem, I felt that I would add my solution here for others to try.
I first created a new ArcGISDynamicMapServiceLayer
with the MapServer's URL, then used the .setVisibleLayers
function to denote which layers in the MapServer should be displayed.
I can't use the OP's example MapServer because it has been taken down. But lets use esri's state, city, highway layer as an example. If I only want to show the highways on the map:
var newLayer = new ArcGISDynamicMapServiceLayer('http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StateCityHighway_USA/MapServer');
var layerIds = [0];
newLayer.setVisibleLayers(layerIds);
map.addLayer(newLayer);
If I wanted to show highways and states, then I would just replace the [0] with [0, 2].
add a comment |
I know that this is an old question and already has an accepted answer. However, the answer goes over exporting the layer as an image. It doesn't seem to answer the OP's question. Because this is the first question that showed up when I was looking up this problem, I felt that I would add my solution here for others to try.
I first created a new ArcGISDynamicMapServiceLayer
with the MapServer's URL, then used the .setVisibleLayers
function to denote which layers in the MapServer should be displayed.
I can't use the OP's example MapServer because it has been taken down. But lets use esri's state, city, highway layer as an example. If I only want to show the highways on the map:
var newLayer = new ArcGISDynamicMapServiceLayer('http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StateCityHighway_USA/MapServer');
var layerIds = [0];
newLayer.setVisibleLayers(layerIds);
map.addLayer(newLayer);
If I wanted to show highways and states, then I would just replace the [0] with [0, 2].
add a comment |
I know that this is an old question and already has an accepted answer. However, the answer goes over exporting the layer as an image. It doesn't seem to answer the OP's question. Because this is the first question that showed up when I was looking up this problem, I felt that I would add my solution here for others to try.
I first created a new ArcGISDynamicMapServiceLayer
with the MapServer's URL, then used the .setVisibleLayers
function to denote which layers in the MapServer should be displayed.
I can't use the OP's example MapServer because it has been taken down. But lets use esri's state, city, highway layer as an example. If I only want to show the highways on the map:
var newLayer = new ArcGISDynamicMapServiceLayer('http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StateCityHighway_USA/MapServer');
var layerIds = [0];
newLayer.setVisibleLayers(layerIds);
map.addLayer(newLayer);
If I wanted to show highways and states, then I would just replace the [0] with [0, 2].
I know that this is an old question and already has an accepted answer. However, the answer goes over exporting the layer as an image. It doesn't seem to answer the OP's question. Because this is the first question that showed up when I was looking up this problem, I felt that I would add my solution here for others to try.
I first created a new ArcGISDynamicMapServiceLayer
with the MapServer's URL, then used the .setVisibleLayers
function to denote which layers in the MapServer should be displayed.
I can't use the OP's example MapServer because it has been taken down. But lets use esri's state, city, highway layer as an example. If I only want to show the highways on the map:
var newLayer = new ArcGISDynamicMapServiceLayer('http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StateCityHighway_USA/MapServer');
var layerIds = [0];
newLayer.setVisibleLayers(layerIds);
map.addLayer(newLayer);
If I wanted to show highways and states, then I would just replace the [0] with [0, 2].
answered Apr 9 at 18:49
PyroPyro
719
719
add a comment |
add a comment |
Check out the ESRI API Reference Page for DynamicMapServiceLayer. I believe you will want to incorporate setVisibleLayers into your code.
I am not going to be managing the server for this project, just building the front-end. For easier management in the future would it make more sense for all the map layers to be setup/organized differently on the backend? Eventually I will build the front end to give users controls of many layers visibility, opacity etc.
– jotamon
Oct 29 '12 at 21:00
Hi Craig, the link seems to be dead?
– bummi
Apr 9 at 18:51
add a comment |
Check out the ESRI API Reference Page for DynamicMapServiceLayer. I believe you will want to incorporate setVisibleLayers into your code.
I am not going to be managing the server for this project, just building the front-end. For easier management in the future would it make more sense for all the map layers to be setup/organized differently on the backend? Eventually I will build the front end to give users controls of many layers visibility, opacity etc.
– jotamon
Oct 29 '12 at 21:00
Hi Craig, the link seems to be dead?
– bummi
Apr 9 at 18:51
add a comment |
Check out the ESRI API Reference Page for DynamicMapServiceLayer. I believe you will want to incorporate setVisibleLayers into your code.
Check out the ESRI API Reference Page for DynamicMapServiceLayer. I believe you will want to incorporate setVisibleLayers into your code.
answered Oct 29 '12 at 20:54
CraigCraig
2,99133465
2,99133465
I am not going to be managing the server for this project, just building the front-end. For easier management in the future would it make more sense for all the map layers to be setup/organized differently on the backend? Eventually I will build the front end to give users controls of many layers visibility, opacity etc.
– jotamon
Oct 29 '12 at 21:00
Hi Craig, the link seems to be dead?
– bummi
Apr 9 at 18:51
add a comment |
I am not going to be managing the server for this project, just building the front-end. For easier management in the future would it make more sense for all the map layers to be setup/organized differently on the backend? Eventually I will build the front end to give users controls of many layers visibility, opacity etc.
– jotamon
Oct 29 '12 at 21:00
Hi Craig, the link seems to be dead?
– bummi
Apr 9 at 18:51
I am not going to be managing the server for this project, just building the front-end. For easier management in the future would it make more sense for all the map layers to be setup/organized differently on the backend? Eventually I will build the front end to give users controls of many layers visibility, opacity etc.
– jotamon
Oct 29 '12 at 21:00
I am not going to be managing the server for this project, just building the front-end. For easier management in the future would it make more sense for all the map layers to be setup/organized differently on the backend? Eventually I will build the front end to give users controls of many layers visibility, opacity etc.
– jotamon
Oct 29 '12 at 21:00
Hi Craig, the link seems to be dead?
– bummi
Apr 9 at 18:51
Hi Craig, the link seems to be dead?
– bummi
Apr 9 at 18:51
add a comment |
Thanks for contributing an answer to Geographic Information Systems Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f37828%2fload-one-layer-from-arcgis-server-mapserver%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown