.tundra .dijitTooltipContainer { background: none repeat scroll 0 0 transparent; border: none; }
function showTooltip(evt){ closeDialog(); var tipContent = "<b>" + evt.graphic.attributes.Project+" </b>" ; var dialog = new dijit.TooltipDialog({ id: "tooltipDialog", content: tipContent }); dialog.startup(); // dojo.style(dialog.domNode, "opacity", 0.85); dojo.style(dialog.domNode, "background", "#333"); dojo.style(dialog.domNode, "color", "white"); dijit.placeOnScreen(dialog.domNode, {x: evt.pageX, y: evt.pageY}, ["BL"], {x: 8, y: 8}); }
//Attempt to add tooltips to the SnoCo Stream Gage layer var thisObject = this; //============================================================================= // Functions to display and dismiss the tooltp on the SnoCo Stream Gage features //============================================================================= this.showTooltip = function(evt) { var dialog = new dijit.TooltipDialog({ id: "tooltipDialog", content: "Stage: " + evt.graphic.attributes.curHeight + " Ft<br/>" + dToday + "<br/>" + evt.graphic.attributes.NAME, style: "position: absolute; width: auto; font: normal normal bold 8pt Tahoma;z-index:100" }); dialog.startup(); dojo.style(dialog.domNode, "opacity", 0.85); dojo.style(dialog.domNode, "background", "#333"); dojo.style(dialog.domNode, "color", "#EFEFEF"); dijit.placeOnScreen(dialog.domNode, {x: evt.pageX, y: evt.pageY}, ["TL", "BL"], {x: 10, y: 10}); } this.closeDialog = function() { var widget = dijit.byId("tooltipDialog"); if (widget) { widget.destroy(); } } dojo.connect(theFeatureLayer, "onMouseOver", function(evt) { thisObject.closeDialog(); thisObject.showTooltip(evt); }); dojo.connect(theFeatureLayer, "onMouseOut", this.closeDialog);
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.