Having issues with popup direction

837
7
02-28-2013 10:56 AM
KenDeeds
New Contributor III
On this sample page:

http://citgo.bvk.geoconsensus.com/esri/map_test.php?w=1219&h=414&div=frame&page=road_trip&uid=ctg5C4...

when I mouse over the furthest east icon near the top of the page the popup always opens in a direction of upper right and goes out of view.  I've added my own logic and find the point of the mouseover and figure out which way the popup is to open.  I even output the line that opens the popup, map.infoWindow.show(mapPoint,esri.dijit.InfoWindow.ANCHOR_LOWERLEFT);

How do I make the popup open to lower left?  I tried map.infoWindow.setFixedAnchor but get this error message if using that function (which I found in the manual):  map.infoWindow.setFixedAnchor is not a function

Is there a way on this map to make mouseovers near the top of the page have popups that go down?
0 Kudos
7 Replies
KenDeeds
New Contributor III
Anyone have any ideas why this happening?  We're at the point of looking at other mapping solutions for theclient and I have to say feeling great frustration on this one, sucks to have to rebuild something because the popups don't open in right directions.
0 Kudos
SteveCole
Frequent Contributor
You can try to implement what Stephen posted here but I haven't been able to get this work in my own application. This has been hugely frustrating for me and I wish that the API had an option to handle this. I submitted an idea about this but that doesn't really help you or I at this moment.

Here's a similar thread with some duplicate information and a link to my submitted idea should you feel like voting for it.

Good luck!
Steve
0 Kudos
KenDeeds
New Contributor III
Steve,

Thanks for the follow up, I've done pretty close to what the example is doing and like you doesn't work.  It seems most the time I pan the map it fixes itself, but if I write code to pan the map to a different location on a timeout after it loads bad still.  I've tried map.reposition() and map.resize() after loading as well but no luck.
0 Kudos
KenDeeds
New Contributor III
I've made my example shorter and easier to grasp.  If you view http://citgo.bvk.geoconsensus.com/esri/map_test_two.php on line 62 I use map.infoWindow.show(evt.screenPoint,esri.dijit.InfoWindow.ANCHOR_LOWERLEFT); to open the popup window.  I've hard coded in the title and content sections so they are the same size and not building dynamically.  The "show" function works in the sense the popup actually opens and shows something, but the "esri.dijit.InfoWindow.ANCHOR_LOWERLEFT" part is being 100% ignored.  Even if I use my own code like in the links above I have no abiblity to manually tell the popup which way to open.  The "esri.dijit.InfoWindow.ANCHOR_LOWERLEFT" is 100% ignored.
0 Kudos
KenDeeds
New Contributor III
Well I learned that if you use the dojo dijit called "popup" you can not control the direction it opens in.  Direct quote from esri:

"You are correct, if you use this method, you can not control the direction it opens.  Popup will always decide where to position/open itself, while infoWindow can be told what direction to position/open via anchor constants."
0 Kudos
KenDeeds
New Contributor III
Does at anyone at esri know if the "popup" will have any directional control in future versions?
0 Kudos
KenDeeds
New Contributor III
I've added this to the "ideas" site and if you are also having issues with this please cast a vote here to have the logic updated so the popup opens in the visible map:

http://ideas.arcgis.com/ideaView?id=087E00000004YO4IAM
0 Kudos