Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [Case Closed] Custom Tooltip for a Map Graph with Lat/Long
Go
New
Search
Notify
Tools
Reply
  
[Case Closed] Custom Tooltip for a Map Graph with Lat/Long
 Login/Join
 
Platinum Member
posted
I am trying to add a custom tooltip to the map code below.

The tooltip that i would like to achieve is:

Line Price: data value
Latitude: lat value
Longitude: lng value

I was using the following documentation
http://documentation.informati...t/source/topic26.htm

Inside the documentation, for the function parameter 'd' description there are Data Modes for maps that we can access to get the lat/lng info.

Any ideas on how i can access those values and add to my tootip return expression?

Sample Code:
JOIN
POSTALCODE IN centurysales TO MULTIPLE
POSTALCODE IN locale
END


GRAPH FILE centurysales
SUM LINEPRICE
BY LATITUDE
BY LONGITUDE
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET UNITS PIXELS
ON GRAPH SET HAXIS 700
ON GRAPH SET VAXIS 400
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 2
ON GRAPH SET LOOKGRAPH BUBBLEMAP
ON GRAPH SET AUTOFIT ON
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0);
setCurveFitEquationDisplay(false);
setPlace(true);
setPlace(true); setToolTipStyle("html5");
*END
INCLUDE=endeflt.sty,$
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
setDisplay(getLegendArea(),true);
*GRAPH_JS
"mapProperties": {
"leaflet": {
"overlayLayers": [{
"layerInfo": {
"type": "regions"
},
"title": "United States of America",
"type": "latlng",
"url": function(){ return tdgchart.getScriptPath() + 'map/US.json'}
}],
"baselayers": [{
"layerInfo": {
"maxZoom": 16,
"attribution": function() { return "&|copy; Information Builders | " +
"Map Tiles: &|copy; Esri"; }
},
"title": "ArcGIS_World_Street_Map",
"url": function() { return 'http://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer/tile/{z}/{y}/{x}'; }
}]
}
},
series: [
{'series': 0,
tooltip: function(d,s,g){
return 'Line Price: ' + d + '
Latitude: ' + d.lat + '
longitude: ' + d.lng ; }
}]
*END
ENDSTYLE
END
-RUN

This message has been edited. Last edited by: WF1326,


WebFOCUS
7703/7705/8105m/8201m/8202m

 
Posts: 100 | Registered: September 10, 2013Reply With QuoteReport This Post
Master
posted Hide Post
Hi WF1326,

I see that you have a case open and they are working on finding a resolution.

Please update the post once you have a resolution from Customer Support. Thanks so much.

Sincerely,

Kathleen Butler
Customer Care & Communications Manager
Information Builders
 
Posts: 429 | Location: New York | Registered: September 20, 2006Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Got a reply from Tech Support. Below code worked for me.

series: [ {'series': 0, tooltip: function(d,s,g, data){ return 'Line Price: ' + d + '[/br]Latitude: ' + data.lat + '[/br]longitude: ' + data.lng ; } }]


WebFOCUS
7703/7705/8105m/8201m/8202m

 
Posts: 100 | Registered: September 10, 2013Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [Case Closed] Custom Tooltip for a Map Graph with Lat/Long

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.