Select to view content in your preferred language

how to make the map frame not change size when brwoser window change size?

928
4
03-10-2011 07:27 AM
DanDong
Deactivated User
Hi all,

Is there a way to set fixed value for the map frame size? I found that if restore down the browser window from maximum status, the size of the map frame become smaller than that when the browser window is in the maximum status. So is there a property in the map frame to make its size not change? There can be scrollbar in the bottom or right side of the browser. Since the map size doesn't change when the user plays with the browser window, he or she can use the scrollbar to see the full map. Thank you:)
0 Kudos
4 Replies
JenniferNery
Esri Regular Contributor
Have you tried setting the map control Height and Width property?
0 Kudos
DanDong
Deactivated User
Have you tried setting the map control Height and Width property?


Yes, but it doesn't work. And it seems like the contents size in the map are also changed. I attach two screen shots of this issue, one is maximum browser window, the other is the restored browser window.

In the  maximum browser window picture, you can see that the 322N 2W 1 PLSS is in the middle, but in the restored browser window picture, 322N 2W 1 PLSS is not in the middle...

It is a little weird that why the contents' size cannot changed as the map frame size... Do you have some suggestion? Thank you 🙂

[ATTACH]5351[/ATTACH]
[ATTACH]5352[/ATTACH]
0 Kudos
JenniferNery
Esri Regular Contributor
I cannot replicate this.  The map extent does not change for me when I resize my web browser. Maybe you can check in your application if you perform any zoom or pan before the size of the map is changed.

If you have some code to share or steps that will help us reproduce the issue, that would be great. Please try to keep the code to minumum as much as you can. Thank you.
0 Kudos
DanDong
Deactivated User
I cannot replicate this.  The map extent does not change for me when I resize my web browser. Maybe you can check in your application if you perform any zoom or pan before the size of the map is changed.

If you have some code to share or steps that will help us reproduce the issue, that would be great. Please try to keep the code to minumum as much as you can. Thank you.


Thank you Jennifer! Your guessing is very helpful. Before change the browser window, I do zoom in the map! So I add a eventhandler to handle the window_size_change event. In the event I write codes to do this zoom in function again. So right now, they map content stay the same whether or not I change the browser size. Thank you 🙂
0 Kudos