Click to Identify a map feature in 1.2?
I am trying to create an HTML 5 viewer for the first time. I want the user to be able to click on a map feature to open an attribute info window. Is this possible? I have the layers set up in the Site, with maptips on (but not working), and Allow Identify Operations on for both layers. But when I launch the map and click on a feature nothing happens.
I tried looking at the Admin and Developer guide, and there is something about a FeatureDetails Module, but no actionable information on what to do with it. I also checked the JavaScript API site, but I couldn't find anything there either. I opened the Dekstop.json.js file in the Resources/Config/Default folder, and found the FeatureDetails module, but I have no idea what to do with it. I am obviously totally not understanding how to use set this up. Can anyone help?
Thanks,
Mike
-
Nothing much works on your site besides the zoom in and out. The I want to menu does not open... If you search the JSON file for module "Results" and set it to:
"resultMappings" : {
"Identify" : [ "ShowResultsList" ],
"MapTip" : [ "ShowResultsList" ],
"Workflow" : [ "ShowResultsList" ],
"Search" : [ "ShowResultsList" ]you might get what you want...
0 -
Thanks for the help, Mike. I had several problems - I think my site was malfunctioning, or the viewer (like you said, the I want to menu was not working). Also I was trying to edit the wrong Desktop.json.js file - there is one in the inetpub/wwwroot/{html viewer}/Resources/Config/Default folder as well.
So I created a new site, a new viewer, and set the MapTip property in the Desktop.json.js file to ShowResultsList as you suggested (from ShowMapTipResults). Everything else was the same. Then I turned on MapTips in the Site:Map:Layer properties. It seems to work now.
My only other question would be - how did you know to do that? I seem to be missing the reference guide that explains those settings.
Thanks again,
Mike
0 -
Can't remember. I didn't like the way Map Tips worked, especially early on, so I was asking questions on the forum and the developers. I was also playing with the JSON files, so maybe I just stumbled upon it... But yes, better documentation would be nice...
0 -
Mike
Q:\Program Files (x86)\Latitude Geographics\Geocortex Essentials\Default\REST Elements\Sites\"your site"\Viewers\"your mobile viewer"\VirtualDirectory\Resources\Config\Default\Desktop.json.js , Handheld.json.js , Tablet.json.js
I changed the onClick in the .js files to "onClick" : [ "Identify", "ClearDefaultHighlights" ], from "onClick" : [ "InvokeMapTip", "ClearDefaultHighlights" ],.
Jimmy Brink
0 -
Thanks Jimmy, that works great!
Mike
0 -
I know this post is old, but that fix worked for me too. Now I'm also looking for how to identify a feature AND show its details by clicking the map. Any idea how to add that second step? 0 -
John, did you come up with anything?
I want to be able to identify on click without using the identify tool.0
Please sign in to leave a comment.
Comments
7 comments