Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I programmatically create several layers for my map and I want my layers to be on top of the layers from the original map.

Is there a way I can do that? I also want to be able to put "bring forward/backward" as a menu item in the TOC context menu.

Thanks and Regards

share|improve this question
    
What language are you programming with (ArcObjects, Python)? –  artwork21 Mar 25 '11 at 15:43
    
Sorry, ArcEngine 10 .Net 4. –  Kev84 Mar 25 '11 at 17:26
    

2 Answers 2

up vote 2 down vote accepted

Did you try this?

mapControl.MoveLayerTo(startIndex, endIndex);

Your question is similar to this one:

Right click on layer in TOCControl get a context menu

share|improve this answer
    
Yes, thanks, i have seen that TOCControl link before, but i also implemented it, but i still couldn't figure out how to move layer up down, thanks. –  Kev84 Mar 25 '11 at 17:30
    
@Kev84, your question has multiple parts, TOC context menus, and TOC context menu items, and move map layer up and down. What parts do you still need help with? –  patrick Mar 25 '11 at 17:34

Is this for one of the web frameworks or desktop?

share|improve this answer
    
I suspect the downvote occurred because although this is a good question, it should have been entered as a comment below the original question, rather than a reply. @Artwork provides a good example you can follow. –  whuber Mar 25 '11 at 16:18
3  
However, it's hard to comment when you don't have that privilege. –  Anthony -GISCOE- Mar 25 '11 at 16:46
    
@Anthony There's a reason for that restriction :-). I guess it's to encourage people to earn reputation first. –  whuber Mar 25 '11 at 17:25

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.