Select to view content in your preferred language

Dynamic Map Service and Feature Layer

2102
2
Jump to solution
09-30-2015 04:37 AM
ChristopherJohnson1
Frequent Contributor

Good morning.

I have a JavaScript application that uses both a dynamic map service layer and a feature layer.  if I render the map, with just the feature layer, everything displays fine.  However, if I add the dynamic map service layer to the map, as well, the map is pushed down on the page.  If I use CSS to modify the position of the map (using negative margins), the map is almost functional, but clicking on the map generates incorrect data -- if I click on Ohio, I will get the data for a State that is more South than Ohio.  I assume that this is due to the re-positioning using CSS, as this behavior is absent when I just have the feature layer on the map.  Any thoughts on any of this?

Thanks...Chris

0 Kudos
1 Solution

Accepted Solutions
ChristopherJohnson1
Frequent Contributor

Hi, Jake.  Both the DynamicMapServiceLayer and the FeatureLayer have the same projection, but they had different extents.  I specified the extent and now the map appears correctly, without the gap at the top.  Thanks for the hint!

Chris

View solution in original post

2 Replies
JakeSkinner
Esri Esteemed Contributor

Hi Christopher,

This sounds like this could possibly be a projection issue.  Would you be able to post your code?

ChristopherJohnson1
Frequent Contributor

Hi, Jake.  Both the DynamicMapServiceLayer and the FeatureLayer have the same projection, but they had different extents.  I specified the extent and now the map appears correctly, without the gap at the top.  Thanks for the hint!

Chris