<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: &amp;quot;Tooltip&amp;quot; when mousing over a point in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/amp-amp-amp-quot-tooltip-amp-amp-amp-quot-when/m-p/559238#M52169</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The sample that btfou posted uses an InfoWindow.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Try starting with the infoWindow documentation &amp;amp; samples.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Doc:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="https://developers.arcgis.com/en/javascript/jsapi/infowindow-amd.html"&gt;https://developers.arcgis.com/en/javascript/jsapi/infowindow-amd.html&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;Sample:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="https://developers.arcgis.com/en/javascript/jshelp/intro_infowindow.html"&gt;https://developers.arcgis.com/en/javascript/jshelp/intro_infowindow.html&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 Jul 2013 16:48:29 GMT</pubDate>
    <dc:creator>JonathanUihlein</dc:creator>
    <dc:date>2013-07-19T16:48:29Z</dc:date>
    <item>
      <title>&amp;amp;amp;quot;Tooltip&amp;amp;amp;quot; when mousing over a point</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/amp-amp-amp-quot-tooltip-amp-amp-amp-quot-when/m-p/559236#M52167</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am converting a bunch of Google Maps web pages to ESRI Maps. In Google Maps, I was able to have a "tooltip" that would appear when a user moused over a point on the map (Example: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://wa.water.usgs.gov/projects/skagit/hydrographs.htm" rel="nofollow" target="_blank"&gt;http://wa.water.usgs.gov/projects/skagit/hydrographs.htm&lt;/A&gt;&lt;SPAN&gt;). Can I do this on my ESRI map? (Example: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://wa.water.usgs.gov/projects/puyallupmonitoring/hydrographs.htm" rel="nofollow" target="_blank"&gt;http://wa.water.usgs.gov/projects/puyallupmonitoring/hydrographs.htm&lt;/A&gt;&lt;SPAN&gt;) I've tried a few things, but haven't been successful.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jul 2013 14:45:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/amp-amp-amp-quot-tooltip-amp-amp-amp-quot-when/m-p/559236#M52167</guid>
      <dc:creator>RayJulich</dc:creator>
      <dc:date>2013-07-19T14:45:01Z</dc:date>
    </item>
    <item>
      <title>Re: "Tooltip" when mousing over a point</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/amp-amp-amp-quot-tooltip-amp-amp-amp-quot-when/m-p/559237#M52168</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Here's sample &lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/en/javascript/jssamples/fl_hover.html"&gt;https://developers.arcgis.com/en/javascript/jssamples/fl_hover.html&lt;/A&gt;&lt;SPAN&gt; that is a good starting point for showing a tooltip for graphics.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jul 2013 16:04:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/amp-amp-amp-quot-tooltip-amp-amp-amp-quot-when/m-p/559237#M52168</guid>
      <dc:creator>BenFousek</dc:creator>
      <dc:date>2013-07-19T16:04:34Z</dc:date>
    </item>
    <item>
      <title>Re: "Tooltip" when mousing over a point</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/amp-amp-amp-quot-tooltip-amp-amp-amp-quot-when/m-p/559238#M52169</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The sample that btfou posted uses an InfoWindow.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Try starting with the infoWindow documentation &amp;amp; samples.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Doc:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="https://developers.arcgis.com/en/javascript/jsapi/infowindow-amd.html"&gt;https://developers.arcgis.com/en/javascript/jsapi/infowindow-amd.html&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;Sample:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="https://developers.arcgis.com/en/javascript/jshelp/intro_infowindow.html"&gt;https://developers.arcgis.com/en/javascript/jshelp/intro_infowindow.html&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jul 2013 16:48:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/amp-amp-amp-quot-tooltip-amp-amp-amp-quot-when/m-p/559238#M52169</guid>
      <dc:creator>JonathanUihlein</dc:creator>
      <dc:date>2013-07-19T16:48:29Z</dc:date>
    </item>
    <item>
      <title>Re: "Tooltip" when mousing over a point</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/amp-amp-amp-quot-tooltip-amp-amp-amp-quot-when/m-p/559239#M52170</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;The sample that btfou posted uses an InfoWindow.]&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Incorrect. This sample uses a dijit/TooltipDialog with mouse-over and mouse-out events. Nothing to do with infoWindow.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Based on the links in the original post this is the functionality needed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ray - ran this in the console of your map:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;var dialog = new dijit.TooltipDialog({
&amp;nbsp; style: 'position:absolute; width:100px;'
});
dojo.style(dialog.connectorNode, 'display', 'none');
dialog.startup();
map.getLayer('points_glayer').enableMouseEvents();

map.getLayer('points_glayer').on('mouse-over', function (evt) {
&amp;nbsp; //set the content to your local well no field
&amp;nbsp; //dialog.setContent(evt.graphic.attributes.WELL_NO);
&amp;nbsp; dialog.setContent('Hi! I'm a tooltip');
&amp;nbsp; dijit.popup.open({
&amp;nbsp;&amp;nbsp;&amp;nbsp; popup: dialog,
&amp;nbsp;&amp;nbsp;&amp;nbsp; x: evt.pageX,
&amp;nbsp;&amp;nbsp;&amp;nbsp; y: evt.pageY
&amp;nbsp; });
});
map.getLayer('points_glayer').on('mouse-out', function (evt) {
&amp;nbsp; dijit.popup.close(dialog);
});&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I noticed your points_glayer doesn't have attributes. When you create the graphics form your data source take the well number and add it as an attribute of the graphic like this&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;graphic.setAttributes({ WELL_NO: the_well_no });&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;then you can use it to display as shown in commented part of the code above.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 00:07:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/amp-amp-amp-quot-tooltip-amp-amp-amp-quot-when/m-p/559239#M52170</guid>
      <dc:creator>BenFousek</dc:creator>
      <dc:date>2021-12-12T00:07:59Z</dc:date>
    </item>
    <item>
      <title>Re: "Tooltip" when mousing over a point</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/amp-amp-amp-quot-tooltip-amp-amp-amp-quot-when/m-p/559240#M52171</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Incorrect. This sample uses a dijit/TooltipDialog with mouse-over and mouse-out events. Nothing to do with infoWindow.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;This code listens for onMouseOver to display an InfoWindow when the mouse hovers over a graphic.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Taken from the description on your sample page.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;* * * &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;After inspecting rjulich's code, I see that they are already using an infoWindow.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[HTML]dojo.connect(glayer, "onClick", function (evt) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.infoWindow.setContent(g.getContent());&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.infoWindow.setTitle(g.getTitle());&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.infoWindow.show(evt.screenPoint, map.getInfoWindowAnchor(evt.screenPoint));&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;});[/HTML]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, it seems that they want to be able to show a small infoWindow on hover, and a larger infoWindow on click.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think it would be less work to continue using infoWindows rather than a TooltipDialog, which accomplishes the exact same thing in this specific circumstance. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;rjulich can create a mouse hover event for showing and hiding the infoWindow, just like Ben did with the TooltipDialog.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would also suggest trying the AMD style of Dojo, if you are feeling adventurous.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jul 2013 19:48:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/amp-amp-amp-quot-tooltip-amp-amp-amp-quot-when/m-p/559240#M52171</guid>
      <dc:creator>JonathanUihlein</dc:creator>
      <dc:date>2013-07-19T19:48:46Z</dc:date>
    </item>
    <item>
      <title>Re: "Tooltip" when mousing over a point</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/amp-amp-amp-quot-tooltip-amp-amp-amp-quot-when/m-p/559241#M52172</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The description does say "infoWindow", but it's in the generic sense and not an esri infoWindow.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The esri InfoWindow is ineffective as a tooltip. There is already a infoTemplate for the graphics. If the user clicks on a graphic to open infoWindow with the infoTemplate, then moves the mouse over another graphic the infoWindow is going to close and reopen as the tooltip. Doesn't seem very user friendly to me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also I doubt that a tooltip is more coding that dealing with the infoWindow.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jul 2013 20:15:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/amp-amp-amp-quot-tooltip-amp-amp-amp-quot-when/m-p/559241#M52172</guid>
      <dc:creator>BenFousek</dc:creator>
      <dc:date>2013-07-19T20:15:38Z</dc:date>
    </item>
    <item>
      <title>Re: "Tooltip" when mousing over a point</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/amp-amp-amp-quot-tooltip-amp-amp-amp-quot-when/m-p/559242#M52173</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yes. This is what I'm looking for. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I noticed your points_glayer doesn't have attributes. When you create the graphics form your data source take the well number and add it as an attribute of the graphic like this&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;graphic.setAttributes({ WELL_NO: the_well_no });&lt;/PRE&gt;&lt;BR /&gt;then you can use it to display as shown in commented part of the code above.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can't figure out where in my code to insert the graphic.setAttributes({ WELL_NO: siteid }); code. I create the layer toward the top of the page:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;defineGraphicLayer("points_glayer", 1);
var glayer = map.getLayer("points_glayer"); 
glayer.clear();&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a loop farther down in the code that reads data from a file where I actually read in the siteid variable for each point.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 00:08:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/amp-amp-amp-quot-tooltip-amp-amp-amp-quot-when/m-p/559242#M52173</guid>
      <dc:creator>RayJulich</dc:creator>
      <dc:date>2021-12-12T00:08:01Z</dc:date>
    </item>
    <item>
      <title>Re: "Tooltip" when mousing over a point</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/amp-amp-amp-quot-tooltip-amp-amp-amp-quot-when/m-p/559243#M52174</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE class="plain" name="code"&gt;//Add the marker to the map siteTemplate = new esri.InfoTemplate(title, info); /* //set attributes here */ attr = { SITE_NAME: site_name }; graphic = new esri.Graphic(point, icon, attr, siteTemplate); map.infoWindow.resize(500, 400); glayer.add(graphic);&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jul 2013 16:15:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/amp-amp-amp-quot-tooltip-amp-amp-amp-quot-when/m-p/559243#M52174</guid>
      <dc:creator>BenFousek</dc:creator>
      <dc:date>2013-07-25T16:15:53Z</dc:date>
    </item>
    <item>
      <title>Re: "Tooltip" when mousing over a point</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/amp-amp-amp-quot-tooltip-amp-amp-amp-quot-when/m-p/559244#M52175</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you. That worked for me.&amp;nbsp; That's what I was looking for: &lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://wa.water.usgs.gov/projects/puyallupmonitoring/hydrographs.htm"&gt;http://wa.water.usgs.gov/projects/puyallupmonitoring/hydrographs.htm&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jul 2013 18:18:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/amp-amp-amp-quot-tooltip-amp-amp-amp-quot-when/m-p/559244#M52175</guid>
      <dc:creator>RayJulich</dc:creator>
      <dc:date>2013-07-25T18:18:07Z</dc:date>
    </item>
  </channel>
</rss>

