Select to view content in your preferred language

info window for map

783
4
01-11-2011 11:59 AM
abukhan
Occasional Contributor
I used infowindow for information of a feature layer on click event.
The way i implemented is onMouseUp event on map:

  private const infowindowscreen:mxmlpage = new mxmlpage ();

private function onMouseUpMap(event:MouseEvent):void
   {
const mapPoint:MapPoint = MainMap.toMapFromStage(event.stageX,event.stageY);

  Map.infowindow.content = infowindowscreen;
  ---code to add values to all public variables on infowindowscreen--
Map.infowindow.show(mapPoint);

}

It works fine.. however the infoscreen sometimes go beyond the screen especially close to the edges.
Is there a way automatically center it on the screen?
Tags (2)
0 Kudos
4 Replies
DasaPaddock
Esri Regular Contributor
Have you changed the infoPlacementMode style? It defaults to "auto":

http://help.arcgis.com/en/webapi/flex/apiref/com/esri/ags/components/supportClasses/InfoContainer.ht...
0 Kudos
abukhan
Occasional Contributor
Dasa:

for Map.infoWindow, infoPlacementMode is in styles..I did not change any default settings for infoWindow.
Is there any example showing infoPlacementMode with styles?

What I wanted to have infoWindow to show not beyond the screen...

Thanks.

abu
0 Kudos
DasaPaddock
Esri Regular Contributor
In the default "auto" mode it should be trying to stay on screen. Can you reproduce it on this sample?
http://help.arcgis.com/en/webapi/flex/samples/index.html?sample=FeatureLayer_Click_OnDemand
When I click on the right, it comes up on the left and the opposite on the left side of the map. When I pan and move it near an edge, it repositions to try and stay in view.

Could you post a screenshot of what you're seeing in your app?
0 Kudos
abukhan
Occasional Contributor
Desa:

it looked like my info window is big and because of that it got cut out..

However i tried with a popup window and put a marker where it clicked, and then center the map at the point i clicked...It worked fine...

Thanks..
0 Kudos