Select to view content in your preferred language

Draw cursor offset issue

4068
14
Jump to solution
05-14-2014 11:36 AM
AlexGole1
Emerging Contributor
Hi,
I am using the following: http://jsbin.com/mutis/1/edit  script and I get a cursor offset when I draw using a freehand poly or simple poly. I noticed that some people have had the same issue in the past. Can anyone tell me how to fix this?
Thank you,
Alex
0 Kudos
1 Solution

Accepted Solutions
JohnGravois
Deactivated User
my apologies, but i just realized that i had commented out all of our drop shadow divs earlier to try and simplify your app a little bit.

http://jsfiddle.net/jagravois/Dy4r4/

ill have to leave it to you if you'd like to try and add them back in and sort out the rest on your own.

View solution in original post

0 Kudos
14 Replies
JohnGravois
Deactivated User
hi alex,

there are a variety of resources missing in your jsbin that make it impossible to test with it.

in general, its probably a CSS problem, as discussed in this forum.
http://forums.arcgis.com/threads/47975-Map-Navigation-Mouse-Offset?highlight=offset
0 Kudos
AlexGole1
Emerging Contributor
hi alex,

there are a variety of resources missing in your jsbin that make it impossible to test with it.

in general, its probably a CSS problem, as discussed in this forum.
http://forums.arcgis.com/threads/47975-Map-Navigation-Mouse-Offset?highlight=offset


It seems like the problem is the toolbar. When I remove the toolbar from the <div map> it works fine. When I keep as such there is an offset. Is there a way to keep the toolbar within the map div and have the draw tool work?
Thank you,
Alex
0 Kudos
JohnGravois
Deactivated User
have you tried calling map.reposition() as suggested in the forum thread i linked previously?
0 Kudos
AlexGole1
Emerging Contributor
have you tried calling map.reposition() as suggested in the forum thread i linked previously?

I have not because I am not sure where to place it in my script. Where should the map.reposition() go?
0 Kudos
JohnGravois
Deactivated User
hard to tell you without seeing a sample app that shows the problem.
0 Kudos
AlexGole1
Emerging Contributor
hard to tell you without seeing a sample app that shows the problem.

This sample is a very simplified (old) version of my app. http://jsbin.com/ficetiwo/1/edit (click run with js). Click on the "Extract Data" tab at the bottom and then Select an area of interest to draw. I am not sure where to add the map reposition function in this script.
0 Kudos
JohnGravois
Deactivated User
alex,
adding a dedicated <div> for the map inside your content pane (instead of associating the map object with the div for the content pane itself) resolved the problem with the cursor for me.

map = new Map("map2", {
...
<section id="fancy"
</section>
<div id="map2"></div>
0 Kudos
AlexGole1
Emerging Contributor
alex,
adding a dedicated <div> for the map inside your content pane (instead of associating the map object with the div for the content pane itself) resolved the problem with the cursor for me.

map = new Map("map2", {
...
<section id="fancy"
</section>
<div id="map2"></div>


Where does the toolbar go in that case?
<section id="fancy"
</section>
0 Kudos
JohnGravois
Deactivated User
i just left everything right where it was.

<section id="fancy"  ...
<section id="search" ></section>
...
</section>
0 Kudos