Select to view content in your preferred language

Awkward map zoom behavior? (Zooms to the right and not center??)

1076
3
10-17-2012 10:09 AM
JafarAl-Kofahi
Deactivated User
Hi all,

I have an ASP.Net application (uses Ajax) and I wrote my own map control. When I run the application and go to test my map control, it behaves in a very awkward way! Here is an example:
[ATTACH=CONFIG]18498[/ATTACH]

Now if I scroll my mouse to zoom in it zooms to the lower right corner rather than the center

[ATTACH=CONFIG]18499[/ATTACH]

If I use the scroll/zoom bar it zoom into the center!

Any thoughts?

Thanks
Jafar
0 Kudos
3 Replies
derekswingley1
Deactivated User
I wrote my own map control.


Did you start from scratch or are you wrapping esri.Map?

If I use the scroll/zoom bar it zoom into the center!


The easiest way to get help is to post code that reproduces the issue. Can you post a simple test page that shows the problem?
0 Kudos
by Anonymous User
Not applicable
Original User: jafarkofahi

Did you start from scratch or are you wrapping esri.Map?

Yes I used esri.Map



The easiest way to get help is to post code that reproduces the issue. Can you post a simple test page that shows the problem?

I will try to recreate the problem in a small app then post it
0 Kudos
JafarAl-Kofahi
Deactivated User
I tried to replicate my problem in a separate sample project, but I couldnt replicate all of the issues! I couldnt replicate my zoom issue but I was able to replicate my other problem, which is the map load. When I navigate to the tab that has the map, the map will be shown but with two issues: first you might not see the map although its there so you need to zoom in, second, it doesnt expand to fill in the whole area until I do a postback (there is a button in the sample app). After the postback it opens and runs fine! In my actual application solving this postback issue would solve my zoom problem.

In the attachment you will find an ASP.Net web project with an ASP.net user control called
wcStaticMapControl
if you run the application you will have two tabs: Test (selected by default) and Map Panel, please click on the Map Panel then you will get the map, zoom in and you will see that the map is not filling its space. After that click the "Click for postback" button and you might need to zoom in again but this time you will notice that the map had expanded!

Any help would be much appreciated

thanks
Jafar
0 Kudos