Solved! Go to Solution.
How about an enhancement? toolbar.activate(esri.toolbars.Draw.POINT, {tooltip: "my-custom-tool"});
Shaun,
It looks like from that sample you can change the style to match what you want. Just use the css
.map .tooltip { background-color: red; border: 1px solid #7EABCD; border-radius: 4px 4px 4px 4px; font-size: 9pt; padding: 5px; position: absolute; width: 100px; z-index: 9999; }
and add it to a map that has tool tips like the draw toolbar and you should get the desired effect.
-Stan
This should be an enhancement but if you want to avoid all that code you could replace the _setTooltipMessage method. Do the default action unless this._options.tooltip exists. Initialize the Draw tool with
drawTool = new Draw(map, {tooltip: "place text"})
Alternatively you could set
drawTool._tooltip.innerHTML = "place text"
when you activate() it.
I have the css and JS working for the text tooltip. Is there a way to have a symbol (i.e a "x") follow my mouse around as well?
Mark,
I came across this thread. I want to add a custom cursor to Robert's famed eSearch. Like my site MapViewer - Savannah Area GIS has.
So what you'd do basically is set the cursor to a custom image ....
this.map.setMapCursor("url(images/cursor_parcel1.cur),auto"); // (the cursor image on my site above)
And when draw is deactivated...
this.map.setMapCursor("default");
I just need to make the tooltip move out of the way to the right but am still trying to figure out where they nestled that div away.
Today I am trying to understand how eSearch works for this. I see various things where Draw is active. I leave it active after clicking for my test site. And it's basically good, except that hitting Clear in the Graphic search tab deactivates draw but leaves the cursor image on. I am trying to figure that out. And I haven't really gotten to Identify yet either.
It's half-working, here... I still need to get it on better click handlers especially identify.
Also you need to make a .cur image file. It has to be a .cur file. I used this site: Cursor Editor because you need to choose the hot spot of the cursor, i.e. where it will be "active" and click on the screen.
So, a work in progress... I'll post back when complete!