Popup not showing over my point file: displays elswhere in the world.

1447
10
08-24-2011 09:44 AM
DonCopple
Deactivated User
In Flex Viewer 4 - I have a dynamic layer that displays fine.  Have built a popup xml file for that layer.
I have other layers with the same spatial reference that display fine.

One difference I do see is that the HTML Popup Type on the other layers on the server are set to None.  And on the layer not working is set to AsHTMLText, could that be a problem?

Is there a way to specify where to make the popup show up in the application in the popup configuration file?  Any ideas would be appreciated
Thanks,
Don
Tags (2)
0 Kudos
10 Replies
BjornSvensson
Esri Regular Contributor
One difference I do see is that the HTML Popup Type on the other layers on the server are set to None.  And on the layer not working is set to AsHTMLText, could that be a problem?


No, I wouldn't think so.

Is there a way to specify where to make the popup show up in the application in the popup configuration file?


No.

Is the layer publicly available for us to see? Is it based on an event layer or something else that could make it different from more normal layers?  How far off are the popups displaying?  Are you using a web mercator basemap and the popups are showing up outside of Africa near 0,0 latlong?  Or are they just off "a little"?
0 Kudos
DonCopple
Deactivated User
I beleive it is publicaly availible, it is an event layer that should autorefresh when a database is updated.  The data has a lat/lon field, wgs 84, the points display correctly in the viewer, but the popups do display off the coast of Africa.  I appreciate your response.  I am using the canned Flex Viewer which I believe is in we mercator.  I have other layers in the same projection that I am using for the event layer, that are displaying just fine.  The test viewer is not public yet, but will be soon.

Here is a link to the layer I am trying to get the popups to display correctly from:

http://test10arcgis.mt.gov/ArcGIS/rest/services/DNRC/Wildfire_Protection/MapServer/3

This server url will not be used once we get the production version up and running, so anyone else should not use this url to build any maps from: just a disclaimer there.  Any ideas would be appreciated.
Thanks,
Don
0 Kudos
DonCopple
Deactivated User
OK Bjorn,
A little more information, we have been trying to make adjustments on our server, and still can't get it to display correctly for point features, it will display fine for polygons, both in the same projection.  We have tried changing our point features to web merc, and wgs84, etc.  No change on the display.

The layer is an event layer created from a query of an sql database with lat/lon coordinates.   Our event layer is displaying the points fine and in the correct location, and automatically updating as the SQL database gets updated.  So that part we have working correctly, however the popup is not grabbing the X,Y coordinates of the point.  The popup thinks the X,Y are both 0,0 so the display is off the coast of Africa.  If I click on a polygon in the same map service, the popup reneders correctly, then if I click the map again, the popup displays where I click the poly and renders the popup where the last popup was rendered.  So somehow the x, y parameters from the event layer is not being passed to the popup action script, but is rendering the graphics correctly.

Any ideas would be greatly appreciated.
Thanks,
Don
0 Kudos
DonCopple
Deactivated User
Still no luck with this issue, and haven't heard from anyone.  I think I may have posted under a differnt posting, but forgot I posted it here.  So still having this issue.  Here is the service on our test site: http://test10arcgis.mt.gov/ArcGIS/rest/services/DNRC/Forestry/MapServer    All other popups are working correctly, the current year fire activity is not displaying the popups correctly, still off the coast of Africa, until I confuse it by clicking on another layer with a popup then it will show in the same spot, but then that messes up the rest of the popups until the map is refreshed.  Getting a little frustrating.  If I open this layer in Desktop, ArcGIS Online, and ArcGIS Explorer online, then it renders the popup in the correct spot.  Seems to be just a Flex issue.  Is this a know bug, and is there a work around?

Thanks,
Don
0 Kudos
BjornSvensson
Esri Regular Contributor
This was a bug that was fixed in 10.0 SP 2 (and your server is using 10.0 SP 1).  It was related to specifying outSR for event layers.  For example, go to the Service Directory and use the Query.
e.g. http://test10arcgis.mt.gov/ArcGIS/rest/services/DNRC/Forestry/MapServer/1/query?where=1%3D1&outSR=10...
Note how 3 out of the 5 features have NaN (for their X & Y).

If you try it without the outSR, all five return seemingly valid geometries.
http://test10arcgis.mt.gov/ArcGIS/rest/services/DNRC/Forestry/MapServer/1/query?where=1%3D1&outSR=10...

With SP 2, even the first request will work fine.
0 Kudos
DonCopple
Deactivated User
Thanks Bjorn,
Is there a workaround in the mean time to make this work in Flex?  I don't think our IT department is updating to SP2 that I know of anytime soon?  A couple of this had NaN from the fields anyway, so they would not give and X,Y coordinate.  So three of them should have been valid.  They display fine on the map, but the popup does not.  Is that the SP2 issue, and is there a workaround?
0 Kudos
BjornSvensson
Esri Regular Contributor
I don't think there is any workaround for having the FeatureLayer not send the outSR.

If the "upgrade to SP2" workaround is not an option, try not using event layer...

When you say they display fine on the map, do you mean in ArcMap or FlexViewer?  If the latter, is it a layer of type "feature" or "dynamic"?  If it's of type "feature", then this is probably different from the eventlayer bug I was thinking it was.

FYI - if your crossdomain.xml file allowed *.esri.com it would be easier for me to test 🙂
0 Kudos
DonCopple
Deactivated User
Thanks for the reply again Bjorn,

When I use the whole map service in my config file like below:

<layer label="DNRC Fire Layers" type="dynamic" visible="false" alpha="0.5" visiblelayers="1"
         url="http://test10arcgis.mt.gov/ArcGIS/rest/services/DNRC/Forestry/MapServer">
<sublayer id="0" popupconfig="popups/Popup_IA.xml"/>
<sublayer id="1" popupconfig="popups/Popup_IncidentPoints.xml"/>
<sublayer id="2" popupconfig="popups/Popup_FireDistricts.xml"/>
<sublayer id="4" popupconfig="popups/Popup_HistoricFirePerim.xml"/>
<sublayer id="3" popupconfig="popups/Popup_FireProtect3.xml"/>
</layer>

Sublayer id 1 is the offending layer in this case.  However with the above code in the config, service as dynamic, layer 0 displays fine in all platforms including Flex, however the popups do not work in Flex, other platforms (Desktop, ArcGIS online, etc) will open the popup just fine for the layer.

I have tried loading just this layer as a "feature layer", but it doesn't load that way, which could be the sp2 bug?.  Would love to not have it as a layer created from an event layer, but the main database that it is pulling the data from is an SQL database, with Lat/Lon fields.

So I think the layer is displaying on the output x,y fine and drawing the points on the map, but the popup is not picking up on the x,y coordinates to display correctly. Like I also said before, two points will have NaN and not be displayed but I know about that anyway, that is the way they are in the SQL file, but the three in this case that do show up draw correctly.

Sorry I don't have control of the cross domain file as it is controlled by our IT department at this time.
Attached is a picture from my test app.  It is internal for now until we can get this problem corrected.
[ATTACH=CONFIG]11859[/ATTACH]
0 Kudos
DonCopple
Deactivated User
Me Again,
Still haven't heard a solution yet to this issue.  I can query two layers in the service and both return a correct X and Y coordinate.  I can change the spatial reference of the output and that works fine two.  One layer on the service displays the correct popup (IA Stations), one displays the popup off the coast of Africa.  So still confusing.  Will try the query widget and see if I can get the data correctly that way, but would really like the popup to work.  I can click the popup from the IA Stations (shows up in the correct spot), then click on the current incidents layer, and will replace that popup with the incident information.  However, If I just click the incident, then the popup displays of the African Coast.

Again, using query in the service the correct x/y are returned on both layers......

Link to the test service in earlier message above.

If anyone has found a solution please let me know.  They layers display fine on the map, and in the right locations....

Thanks....
0 Kudos