Select to view content in your preferred language

INITIAL EXTENT NOT CONSISTENT

2637
11
Jump to solution
05-08-2013 11:28 AM
JuneAcosta
Frequent Contributor
The initial extent of my map in IE does not match the initial extent in Chrome or Firefox. Chrome and Firefox match, but the extent is wrong.

Any ideas?

Here is the link..
http://gismaps.carlsbadca.gov/roadMap/index.html

I'm using a downloaded copy of the simple map viewer and and I create the web map using JSON.
webmap.item = {           "title":"Carlsbad Road Maintenance",           //"snippet": "This map shows the Soil Survey Geographic (SSURGO) by the United States Department of Agriculture's Natural Resources Conservation Service.",           "extent": [[-117.4435043334961, 33.00962448120117],[-117.13451385498047, 33.21561813354492]]         };
0 Kudos
1 Solution

Accepted Solutions
JuneAcosta
Frequent Contributor
Thanks Steve for pointing me to the map div.

Looking in the desktop.css, there was no width or height set for #map. So I added a 100% to both height and width,  and now all browsers look the same. I still need to find IE 10 here at the office to see if it looks okay.

View solution in original post

0 Kudos
11 Replies
ShaunWeston
Frequent Contributor
Hiya, I just had a look at that map in IE and Chrome and they were exactly the same. What resolution are you using? How much do the extents differ?
0 Kudos
JuneAcosta
Frequent Contributor
Hi,

Thanks for responding.

Here are some .jpg of what I see. Are you seeing the same thing?

[ATTACH=CONFIG]24156[/ATTACH]
[ATTACH=CONFIG]24157[/ATTACH]
0 Kudos
KenBuja
MVP Esteemed Contributor
Are the different browsers the same size?  If not, that will effect the initial extent. The attachments show the extents of two different Chrome browsers at different sizes.

[ATTACH=CONFIG]24161[/ATTACH]

[ATTACH=CONFIG]24163[/ATTACH]
0 Kudos
KenBuja
MVP Esteemed Contributor
Are the different browsers the same size?  If not, that will effect the  initial extent. The attachments show the extents of two different Chrome  browsers at different sizes.

[ATTACH=CONFIG]24164[/ATTACH]
[ATTACH=CONFIG]24165[/ATTACH]
0 Kudos
JuneAcosta
Frequent Contributor
The different browsers are the same size. Look at my .jpg, you can see that the city boundary is centered on the page, and on Firefox the city boudary is in far top left.
0 Kudos
SteveCole
Honored Contributor
I'm going to suggest that this is due to the fact that your map div is set to 100% widths and that while your monitor may be the same resolution, the available page area is differing between the two browsers. Maybe that extra difference is enough to change zoom levels?

What happens if you set a defined div width, say 800x600?
0 Kudos
JuneAcosta
Frequent Contributor
Hi Steve,

All 3 browsers are opened at full extent before I call the URL to the map. I have also added the center: and zoom: to the map. Chrome and Firefox responds to the changes but the extent of the map is still off. Go back to my map and you will see the changes.

june
0 Kudos
SteveCole
Honored Contributor
I'm now getting at token required error:

Error: Token Required [url:http://gismaps.carlsbadca.gov/arcgis/rest/services/publicAGS/trafficStatus/MapServer/1]


What I was originally suggesting was to take the map resizing that happens with div widths of 100% out of the equation. With a smaller div that fits  within the browser body should return the exact same map extent, regardless of browser. That being said, when I looked at the site in Firefox and IE-10, I saw the same map extent in both (which shoots a hole in my theory a little).


And how did you get v3.5 of the JS API??? :confused:
0 Kudos
KevinMacLeod1
Frequent Contributor
I have seen this too. I believe as posted above it relates to page size and using 100%.  I noticed certain browsers open a border container pane wider or narrower which affects the size of the 'map' object in the center border container pane, at least if it has a splitter and is set to percentage as mine is. It seems slightly differently sized in each browser, I will check this some point soon and report back...

It is unfortunate, I wish there were a solution. What it basically means is you're never sure the EXACT extent if you have users with differing monitor resolutions and browsers.  I am going to have to just explain that to end users. They wanted the "same" zoom and extent for all situations and when you have tiles it doesn't seem possible, it jumps a bit to one direction based on size of the map. Only way would be to lock down the size of the viewport of the bordercontainer pane containing the 'map' object, that I can think of..
0 Kudos