08-29-2018 10:37 AM
I have tool tips configured that display when hovering over parcels on my SDK webmap project. When i add a parcel query to the legend the tool tips no longer display. I have tried programmatically (islocateable: false) and by right mouse click (uncheck locatable) to make the query non-locatable so the parcel tool tips will still display but have not been successful. How can i make the parcel tool tips display when hovering over parcel when i have a parcel query added to the legend? The PARCELS are a WMPS feature.
Thanks!
08-29-2018 11:38 PM
What map layers are present? Is the parcel query layer on top of everything?
08-30-2018 05:53 AM - edited 08-30-2018 05:58 AM
There are many layers including parcels and imagery but before i add the parcel query the tool tips display fine. After I add the parcel query, the parcels in the query do not display their tooltops. I've tried moving the query in the legend up and down (from bottom to top) and making it unlocatable using the legend interface (ie not with code) and still am not able to get the tool tips (information about the parcel) to display when i hover over a parcel included in the query. Thanks!
08-30-2018 07:29 AM
Is the query / parcels a WMPS layer? Or WFS?
08-30-2018 08:05 AM - edited 08-30-2018 11:11 AM
The query is from a WMPS layer as are all the features in legend except for imagery which is from WMS
09-04-2018 02:10 AM
Hi, geoquery!
The tooltip definition, that you have provided in GeoMedia Desktop's Map Window prior to publishing into a WMPS, will be used only if you display the Map, or create an analysis based off a Legend Entry of such a Map.
If your query is based off a Feature Class, there is no way for WMPS to match a tooltip definition to it.
How exactly is your query defined? Is it defined using a Legend Entry, or a Feature Class?
09-04-2018 05:04 AM
Thanks - Is there a way to modify the query locate order like in GeoMedia either by making the query non-locatable or lower in order of legend? I tried doing this non-programatically (from SDK Map Display) using legend interface for query entry but it didn't seem to make any difference. There are several different parcel queries - by parcel #, by parcel owner_name, by drawing a line, circle, or polygon. I use a style with color fill (but transparent) so that the whole border of the parcel is highlighted when mouse passes over it (otherwise sometimes only part of boundary is hightlighted - got that trick from Frank) Code for query by parcel number is below:.
function QueryFind(aparcel) { var string3; } var qName = "ParcelQuery" document.getElementById('dialogbox').style.display = "none"; document.getElementById('dialogoverlay').style.display = "none"; style4 = new Intergraph.WebSolutions.Core.WebClient.Platform.Style.AreaStyle(null, { styles: [{ type: "SimpleLineStyle", color: "#00ff00", width: 3 }, { type: "SimpleFillStyle", // color: "#00ff00", // translucency: 0.7, translucency: 1.0, color: "#ffffff" }] }); $GP.crs.setCurrent("EPSG:3436", function () { $GP.queries.add({ queryName: qName, featureClassId: "D982BC597ACE629341904ADA4C432B175CC79CFA|MasterParcels_View", url: "http://count-gis/jd1/MapService.svc", applicationId: "JD_GOV", definitionName: "MapPublisher", style: style4, addToLegend: true, filters: [ { operator: "like", operands: ["Parcel_ID", aparcel] }], }, function (result) { $GP.queries.find({ analysisId: result.analysisId, }, function (result2) { if (result.updated) { // $GP.ui.info("Analysis updated"); // return; } // result2.analysis.addToDataView(), $GP.queries.find({ analysisId: result.analysisId, }, function (result2) { result2.analysis.getData( function (res) { var i = 0; do { i += 1; } while (res.data[i]); // $GP.ui.info("Total # of queries = " + i); iicount = i - 1; var string1 = JSON.stringify(res.data[iicount].features); var string2 = string1; if (string1.length < 200) { a = "<h3>Parcel with ID " + aparcel + " could not be located.</h3></center"; document.getElementById('dialogboxhead').innerHTML = "Query by Parcel ID"; document.getElementById('dialogboxbody').innerHTML = a; document.getElementById('dialogboxfoot').innerHTML = '<button onclick="Prompt.cancel()">Exit</button>'; dialogbox.style.left = "50px"; dialogbox.style.top = "50px"; dialogbox.style.height = "200px"; dialogoverlay.style.height = "200px"; document.getElementById('dialogbox').style.display = "block"; document.getElementById('dialogoverlay').style.display = "block"; //aBody = a; } if (string1.length > 200) { a = "<h3>Parcel Query Results </h3><form><table class='marroonTable'>"; a += "<tr><td>Parcel Number</td><td>Owner Name</td><td>Site Address</td>"; a += "<td>Total Acres</td></tr>"; do { var pos1 = string1.indexOf("ID") - 2; var pos2 = string1.indexOf("}}"); var str2 = string1.slice(pos1, pos2); str2 = str2 + "}"; var obj = JSON.parse(str2); a += "<tr><td>" + obj.Parcel_ID + "</td>"; a += "<td>" + obj.Owner_Name + "</td><td>" + obj.site_address + "</td><td>"; var bbbox = [Number(obj.xlo) - 1320, Number(obj.ylo) - 1320, Number(obj.xhi) + 1320, Number(obj.yhi) + 1320]; a += obj.Total_Acres + "</td></tr>"; parcelZoom(bbbox); string1 = string1.slice(pos2 + 1, string1.length); } while (string1.length > 200); // a += "</table><br><input type='button' value='Export to Excel' id='btnExcel' /> <input type='button' value='Export to HTML' id='btnHTML' /> <input type='button' value='Export to PLOT' id='btnPLOT' /></form>"; a += "</table><br><input type='button' value='Export to Excel' id='btnExcel' /> <input type='button' value='Export to HTML' id='btnHTML' /></form>"; document.getElementById('dialogboxhead').innerHTML = "Query for Parcel: " + aparcel; document.getElementById('dialogboxbody').innerHTML = a; document.getElementById('dialogboxfoot').innerHTML = '<button onclick="Prompt.cancel()">Exit</button>'; document.getElementById('dialogbox').style.display = "block"; document.getElementById('dialogoverlay').style.display = "block"; dialogbox.style.left = "50px"; dialogbox.style.top = "50px"; dialogbox.style.height = "300px"; dialogoverlay.style.height = "300px"; document.getElementById('btnHTML').onclick = function () { string3 = ConvertToHTML(string2); download(string3, 'ParcelByID_' + aparcel + ".html", 'text/html'); } document.getElementById('btnExcel').onclick = function () { string3 = ConvertToCSV(string2); download(string3, 'ParcelByID_' + aparcel + ".csv", 'text/x-csv'); } document.getElementById('btnPLOT').onclick = function () { string3 = ConvertToPLOT(string2); download(string3, 'ParcelByID_' + aparcel + ".txt", 'text/plain'); } } }); }); }); }); }); }
09-04-2018 05:18 AM
Also can you point me to an example of querying based on legend entry? thanks!
09-04-2018 06:59 AM
Thanks very much - is there an example i can refer to? I am using featureclassid below - should i be using something else?...Full code for my query submitted in original response...
addToLegend : Boolean (optional) add query to the legend or not. It is recommended to add the analysis legend item with a separate addToMap call on the {Analysis} object. Defaults to: true mapServiceId : String (optional) map service id. Either mapServiceId or (url and definitionName) must be provided queryName : String (optional) Display name of the analysis legend item. If analysis with this name already exists, it is updated. queryId : String (optional) ID of the analysis legend item. If analysis with this id already exists, it is updated. url : String (optional) map service url definitionName : String (optional) map service definition name (for example "WFS") featureClassId : String (optional) feature class ID applicationId : String (optional) Application ID (GWMPS) mapStateId : String (optional) map state ID filter : Object (optional) filter style : Object (optional) style callback : Function (optional)
09-06-2018 07:35 AM
Is there an example of creating a query off of a legend entry?
Would i use something other than featureClassId:
Thanks....
$GP.queries.add({ queryName: qName, featureClassId: "E3F07F7628A6C9B15E5D9112D5B48656529775CC|SubdivisionLots", url: "http://count-gis/jd1/MapService.svc",