issue with mobile popup and graphics layer

645
3
Jump to solution
05-30-2012 05:05 AM
PaulJereb
New Contributor
Hello!

I've problems with the mobile popup in connection with graphics: it only shows the title without the (>)-Button to the description.

[ATTACH=CONFIG]14748[/ATTACH]

That's the function I use to add the graphics:
      function addLocation(lon,lat,desc,date,address,field1){         //create a point form the input lat/long         var point = new esri.geometry.Point(lon,lat, new esri.SpatialReference(4326));         //associate the info with the graphics as attributes          var attributes = {           'Address':address,           'Field1': field1,           'Description':desc         };         //define an info template so a popup window with the point details appears when you click point         var infoTemplate = new esri.InfoTemplate('${Field1}','${*}');                  //define a symbol and add point to map          var locationSymbol = new esri.symbol.PictureMarkerSymbol({           "angle":0,           "xoffset":0,           "yoffset":10,           "type":"esriPMS",           "url":"http://static.arcgis.com/images/Symbols/Shapes/BluePin1LargeB.png",           "contentType":"image/png",           "width":24,           "height":24          });          //convert the point from geographics coords to web mercator since map is in web mercator           var webMercatorGeometry = esri.geometry.geographicToWebMercator(point);          var graphic = new esri.Graphic(webMercatorGeometry,locationSymbol,attributes,infoTemplate);          map.graphics.add(graphic);          map.centerAndZoom(webMercatorGeometry,12);              }



Any Ideas?

BR Paul
0 Kudos
1 Solution

Accepted Solutions
KellyHutchins
Esri Frequent Contributor
Paul,

You were close - you just need to associate the graphic with the popup using setFeatures. See this fiddle for an example:

http://jsfiddle.net/NS3GD/1/

View solution in original post

0 Kudos
3 Replies
PaulJereb
New Contributor
added a JSFiddle to illustrate my issue better:
http://jsfiddle.net/blauorange/NS3GD/

Thank you!
Paul
0 Kudos
PaulJereb
New Contributor
bump. anyone?

The sample I used for the JSfiddle is from one of Kelly's posts demonstrating the use of normal popups, that I changed to mobile popups... So I guess it is supposed to work like this.

BR Paul
0 Kudos
KellyHutchins
Esri Frequent Contributor
Paul,

You were close - you just need to associate the graphic with the popup using setFeatures. See this fiddle for an example:

http://jsfiddle.net/NS3GD/1/
0 Kudos