ESRI JS API PopupMobile - view attribute page directly

المشرف العام

Administrator
طاقم الإدارة
I am using the ESRI Javascript API to write a mobile web application. I have used the PopupMobile widget for viewing/editing attributes. This widget creates a popup on the map when a feature(s) is clicked and then provides a button to access the attributes in a new page.

I would like to bypass the popup altogether and go directly to the attribute page. Is this possible?

UPDATE:

I created my own onClick handler instead of using the PopupMobile widget, but I'm getting some very interesting results in my attributes page.

Here is a screenshot of the AttributeInspector widget as it displays on the page I set up in my application:



As you can see, the various dijits that make up the AttributeInspector are not displaying properly on the page.

Here is the code I used to set up the AttributeInspector:

mapDeferred.addCallback(function(response) { map = response.map; currentItem = response.itemInfo; $("#webmapTitle").html(currentItem.item.title); resizeMap(); var fl = currentItem.itemData.operationalLayers[3].layerObject var layerInfo = [{ featureLayer : fl }]; var attInspector = new AttributeInspector({ layerInfos : layerInfo }, "attributeInspector"); attInspector.startup(); dojo.connect(map, "onClick", function(evt) { var toleranceInPixels = 10; var pnt = evt.mapPoint; var pixelWidth = map.extent.getWidth() / map.width; var toleranceInMapCoords = toleranceInPixels * pixelWidth; var ext = new esri.geometry.Extent(pnt.x - toleranceInMapCoords, pnt.y - toleranceInMapCoords, pnt.x + toleranceInMapCoords, pnt.y + toleranceInMapCoords, map.spatialReference); var q = new esri.tasks.Query(); q.geometry = ext; fl.selectFeatures(q) $.mobile.changePage($("#attributePage")); }) }); And here is the markup:

Attributes

Map





أكثر...
 
أعلى