Select to view content in your preferred language

map.infoWindow.ANCHOR_UPPERRIGHT causing object error??

3104
3
03-15-2012 02:27 AM
CliveSwan
Frequent Contributor
The map.infoWindow.setFixedAnchor is causing an object error in the addIdentifyResultsToMap function???
The error is addIdentifyResultsToMap error, details: [object error]

I want to set the position that the imageWindow is displayed!!

I have used the same syntex for the show(map.getInfoWindowAnchor) and setFixedAnchor

I do not get an error with show() line.
I get an error with setFixedAnchor() line??

map.infoWindow.show(event.screenPoint, map.getInfoWindowAnchor(event.screenPoint));
/// SET THE POSITION OF THE IMAGEWINDOW - UPPER RIGHT
map.infoWindow.setFixedAnchor(map.infoWindow.ANCHOR_UPPERRIGHT);

I have copied an example and still get the same error??
map.infoWindow.setFixedAnchor(esri.dijit.InfoWindow.ANCHOR_UPPERRIGHT);


Can anyone spot an error??
0 Kudos
3 Replies
KenDeeds
Regular Contributor
I have the same issue.  In our one map the info window pops up and out of the map if the marker is in the upper right corner or upper left corner.  I've been trying to get the point and then set the anchor to lower right or left if the marker on the map is in the upper right or upper left corner.  I can't do any of this though, only thing I get is:

map.infoWindow.setFixedAnchor is not a function
[Break On This Error] 

map.infoWindow.setFixedAnchor(esri.dijit.InfoWindow.ANCHOR_LOWERLEFT);
0 Kudos
KenDeeds
Regular Contributor
Was also going to add I using the code found here and can not find an example of where this actually works.

http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi_start.htm

I also run the code below, height is generated as an integer usually between 150 and 250 based on content of the infowindow.  This parts below run without the map.infoWindow.setFixedAnchor(esri.dijit.InfoWindow.ANCHOR_LOWERLEFT) part which seems to act as an unknown function.

map.infoWindow.resize(220, height);
map.infoWindow.show(point);
0 Kudos
BalajiViswanathan
Deactivated User
Can you check if you have assigned popup dijit to the map's infowindow.
This might cause the error, since the popup dijit doesn't have the setFixedAnchor method, which is available with map's infowindow.

Try removing this and let me know if this helps.


Was also going to add I using the code found here and can not find an example of where this actually works.

http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi_start.htm

I also run the code below, height is generated as an integer usually between 150 and 250 based on content of the infowindow.  This parts below run without the map.infoWindow.setFixedAnchor(esri.dijit.InfoWindow.ANCHOR_LOWERLEFT) part which seems to act as an unknown function.

map.infoWindow.resize(220, height);
map.infoWindow.show(point);
0 Kudos