<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Mouse Wheel Zooms in Wrong Place Until Window Resize in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/mouse-wheel-zooms-in-wrong-place-until-window/m-p/77194#M6997</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I thought I had solved my problem, but I'm still pulling my hair out over this. I've tried placing all the objects in a container div and tried having them all as independent divs. The only workaround I've found is using 'position: absolute' on everything in that div (the map, the layer list, and the legend header). However, after doing this, all the rest of the non-absolutely positioned divs are no longer positioned properly.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Excluding the legend from the page entirely also seems to resolve the problem (is this a known bug in the legend dijit?)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 24 Jun 2014 04:21:10 GMT</pubDate>
    <dc:creator>PerryKesselbaum</dc:creator>
    <dc:date>2014-06-24T04:21:10Z</dc:date>
    <item>
      <title>Mouse Wheel Zooms in Wrong Place Until Window Resize</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/mouse-wheel-zooms-in-wrong-place-until-window/m-p/77192#M6995</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My application has a problem where after the map loads, when I use the mouse wheel to zoom in, the map zooms in at a location that is not where the cursor is centered. Also, my info windows pop-up in the wrong place. Both the zoom and the pop ups are happening too far 'south' of the cursor/feature.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Strangely, I can get the problem to disappear if I resize the browser window. After I resize the window, the zoom works as usual and info windows show up right next to their features.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't know if this is related, but I also notice the map 'jumps around' during the page load. At the start of the load, the home button, base map switcher and esri logo load higher up on the page, then they jump down to where I want them positioned.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I suspect this has something to do with my CSS, but I can't seem to figure it out. If anyone has any advice for how to solve this issue, it would be greatly appreciated. Below are the respective codes for the page.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;HTML:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[HTML]&amp;lt;div class="col-md-12"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;div class="col-md-6"id="legend"&amp;gt; &amp;lt;h2 class="text-muted"&amp;gt;Legend&amp;lt;/h2&amp;gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;div id="LayerList"&amp;gt; &amp;lt;/div&amp;gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/div&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;div class="col-md-6" id="Map"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;div id="HomeButton"&amp;gt; &amp;lt;/div&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;div id="baseMapToggler"&amp;gt; &amp;lt;/div&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;div id="scale"&amp;gt; &amp;lt;/div&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/div&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/div&amp;gt;[/HTML]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;CSS:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;#Map { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; height: 940px; &amp;nbsp;&amp;nbsp;&amp;nbsp; width: 75%; &amp;nbsp;&amp;nbsp;&amp;nbsp; padding-bottom:150px; &amp;nbsp;&amp;nbsp;&amp;nbsp; margin-left: 250px; &amp;nbsp;&amp;nbsp;&amp;nbsp; margin-top:-705px; }&amp;nbsp; #legend { &amp;nbsp;&amp;nbsp;&amp;nbsp; padding:10px; &amp;nbsp;&amp;nbsp;&amp;nbsp; left: 25px; &amp;nbsp;&amp;nbsp;&amp;nbsp; width: 25%; }&amp;nbsp; #LayerList { &amp;nbsp;&amp;nbsp;&amp;nbsp; left: 25px; &amp;nbsp;&amp;nbsp;&amp;nbsp; width: 25%; }&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;JS:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;function(Map, Legend, FeatureLayer, InfoTemplate,&amp;nbsp; HomeButton, BasemapToggle, Scalebar, dom, domConstruct, on) { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var pointTemplate = new InfoTemplate("&amp;lt;b&amp;gt;${Name}&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;${Address}", "${Comment}&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;${URL}&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;${Picture}"); &amp;nbsp;&amp;nbsp;&amp;nbsp; var otherTemplate = new InfoTemplate("${Name}", "${Comment}"); &amp;nbsp;&amp;nbsp;&amp;nbsp; var Layers = [] &amp;nbsp;&amp;nbsp;&amp;nbsp; var legendLayers = [] &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var map = new Map("Map", { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; autoResize: true, &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; center: [-86.513039, 39.152544], &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; zoom: 11, &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; basemap: "streets" &amp;nbsp;&amp;nbsp;&amp;nbsp; });&amp;nbsp; var scalebar = new esri.dijit.Scalebar({ &amp;nbsp; map:map, &amp;nbsp; scalebarStyle:"ruler", &amp;nbsp; scalebarUnit:"english", }, dojo.byId("scale"));&amp;nbsp; var home = new HomeButton({ map: map }, "HomeButton"); home.startup();&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //push several layers into array &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var arrayLength = Layers.length; for (var i = 0; i &amp;lt; arrayLength; i++) { &amp;nbsp;&amp;nbsp;&amp;nbsp; map.addLayer(Layers&lt;I&gt;); &amp;nbsp;&amp;nbsp;&amp;nbsp; legendLayers.push({ layer: Layers&lt;I&gt;, title:Layers&lt;I&gt;.id }); };&amp;nbsp; var myLegend = new Legend({ &amp;nbsp;&amp;nbsp;&amp;nbsp; layerInfos: legendLayers, &amp;nbsp;&amp;nbsp;&amp;nbsp; map: map &amp;nbsp;&amp;nbsp;&amp;nbsp; }, "LayerList"); &amp;nbsp;&amp;nbsp;&amp;nbsp; myLegend.startup();&amp;nbsp; var toggle = new BasemapToggle({ &amp;nbsp; map: map, &amp;nbsp; basemap: "hybrid" }, "baseMapToggler"); toggle.startup(); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 22 Jun 2014 04:11:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/mouse-wheel-zooms-in-wrong-place-until-window/m-p/77192#M6995</guid>
      <dc:creator>PerryKesselbaum</dc:creator>
      <dc:date>2014-06-22T04:11:27Z</dc:date>
    </item>
    <item>
      <title>Re: Mouse Wheel Zooms in Wrong Place Until Window Resize</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/mouse-wheel-zooms-in-wrong-place-until-window/m-p/77193#M6996</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;For anyone interested, I think I've solved the problem by using position: absolute on the divs that hold the map and the legend. I think the resizing of the legend was messing with the map position on the page. Not sure if this is standard best practice or if this is a bug in the legend dijit, but this workaround works for me.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jun 2014 03:02:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/mouse-wheel-zooms-in-wrong-place-until-window/m-p/77193#M6996</guid>
      <dc:creator>PerryKesselbaum</dc:creator>
      <dc:date>2014-06-24T03:02:04Z</dc:date>
    </item>
    <item>
      <title>Re: Mouse Wheel Zooms in Wrong Place Until Window Resize</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/mouse-wheel-zooms-in-wrong-place-until-window/m-p/77194#M6997</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I thought I had solved my problem, but I'm still pulling my hair out over this. I've tried placing all the objects in a container div and tried having them all as independent divs. The only workaround I've found is using 'position: absolute' on everything in that div (the map, the layer list, and the legend header). However, after doing this, all the rest of the non-absolutely positioned divs are no longer positioned properly.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Excluding the legend from the page entirely also seems to resolve the problem (is this a known bug in the legend dijit?)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jun 2014 04:21:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/mouse-wheel-zooms-in-wrong-place-until-window/m-p/77194#M6997</guid>
      <dc:creator>PerryKesselbaum</dc:creator>
      <dc:date>2014-06-24T04:21:10Z</dc:date>
    </item>
    <item>
      <title>Re: Mouse Wheel Zooms in Wrong Place Until Window Resize</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/mouse-wheel-zooms-in-wrong-place-until-window/m-p/77195#M6998</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Try this &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://jsfiddle.net/2CbVP/2/" rel="nofollow" target="_blank"&gt;version&lt;/A&gt;&lt;SPAN&gt; of the Fiddle.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I removed the autoResize property and added this code&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.on("load", function(){ &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.resize(); &amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jun 2014 11:49:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/mouse-wheel-zooms-in-wrong-place-until-window/m-p/77195#M6998</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2014-06-24T11:49:45Z</dc:date>
    </item>
    <item>
      <title>Re: Mouse Wheel Zooms in Wrong Place Until Window Resize</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/mouse-wheel-zooms-in-wrong-place-until-window/m-p/77196#M6999</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks a million Ken! map.resize() does just the trick. Thanks for your help.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jun 2014 12:03:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/mouse-wheel-zooms-in-wrong-place-until-window/m-p/77196#M6999</guid>
      <dc:creator>PerryKesselbaum</dc:creator>
      <dc:date>2014-06-24T12:03:16Z</dc:date>
    </item>
  </channel>
</rss>

