Select to view content in your preferred language

Map tips still not displaying

1125
3
04-06-2011 10:56 AM
DanielSchatt
Regular Contributor
hi all, I've been trying to get map tips to display for a while and still no luck. As a test, I copied all of the MapTips sample code from the resource center sample into my own project and the map tips display perfectly.  This uses the feature layer from a map service on ESRI's server.  But when I simply substitute my own feature layer from my own map service (and appropriately change the envelope and attributes to bind to), the graphics aren't displaying and the map tips aren't displaying.  There are no errors displayed, and it is reading the features and going through the loop the correct number of times (one for each feature) to add them to the graphics layer.  But the graphics don't show up.

When I look at the two feature layers in the REST directories, the only difference I see  is that the point feature layer from ESRI has the value "esriGeometryPoint" in the Geometry Type, while my own feature layer does not have any value for that.  Could that be the problem and how do I assign that?  Thanks much for any assistance...
0 Kudos
3 Replies
nakulmanocha
Esri Regular Contributor
Please confirm if you run the Query Layer operation on your feature layer from REST page (where 1=1). Does it return the point geometry?

Use your feature layer service URL instead of the following link

http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StatesCitiesRivers_USA/Map...
0 Kudos
JenniferNery
Esri Regular Contributor
When you visit the REST end point on your web browser, what is the geometry type? (Kindly see attached image for sample).

So the features render and gets mouse events? Try subscribing to GraphicsLayer.MouseEnter.
0 Kudos
DanielSchatt
Regular Contributor
Thanks for the help!  Well it turned out that hiding the Shape field (because I didn't want that in my Identify popup) was the source of the problem.  I didn't think making it invisible to the user would make it inaccessible to the server.  Anyway, first I unhid the Shape field in the .mxd and refreshed the service and cleared the REST cache, and still no graphics or map tips.  Even though in the REST endpoint web site, the point geometry was returned, a Shape field was now listed, and the Geometry Type was now esriPointGeometry. 

Finally I just generated a brand new map service with the Shape field visible from the beginning, and then everything worked.  Thought I'm still not clear why the first map service still isn't working..

Thanks again..
0 Kudos