Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED]i need to implement google map

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED]i need to implement google map
 Login/Join
 
Gold member
posted
i need to implement google map to implement my customer table which has country field.the selected country should be generated and rounded in map.please any one help me to solve out a problem

This message has been edited. Last edited by: <Emily McAllister>,


Webfocus AppStudio 8201
Windows
 
Posts: 53 | Registered: May 09, 2016Report This Post
Silver Member
posted Hide Post
Hi Durai,

Not exactly a specific answer to your question, but this conversation string involves using google visualizations and might assist:

http://forums.informationbuild...331/m/2451080592/p/2


WF Version 8105
 
Posts: 45 | Registered: October 07, 2015Report This Post
Gold member
posted Hide Post
Thank you for your reply mike williams.I tried it but showing javascript errors


Webfocus AppStudio 8201
Windows
 
Posts: 53 | Registered: May 09, 2016Report This Post
Master
posted Hide Post
Google maps is pretty easy to add as it's all JavaScript, but you must do it at a code level.

Run your standard query to get your address into a WF Variable like below, &PrimaryPropAddr, &PrimaryPropAddrCity, &PrimaryPropAddrState, and &PrimaryPropAddrZip

TABLE FILE YOURFOLDER/PROPERTYINFO
PRINT
	COMPUTE PrimaryPropAddr/A1000V = PROPERTYINFO_GET.RESPONSE.PROPERTYSTREETNUMBER || ' ' | PROPERTYINFO_GET.RESPONSE.PROPERTYSTREETNAME || ' ' | PROPERTYINFO_GET.RESPONSE.PROPERTYSTREETDIRECTION || '';
	COMPUTE PrimaryPropAddrCity/A1000V = PROPERTYINFO_GET.RESPONSE.CITYNAME || '';
	COMPUTE PrimaryPropAddrState/A1000V = PROPERTYINFO_GET.RESPONSE.PROPERTYALPHASTATECODE || '';
	COMPUTE PrimaryPropAddrZip/A1000V = PROPERTYINFO_GET.RESPONSE.PROPERTYZIPCODE || '-' | PROPERTYINFO_GET.RESPONSE.PROPERTYZIPSUFFIX || '';
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
ON TABLE HOLD AS HOLDPROPERTY FORMAT INTERNAL
END
-RUN
-READFILE HOLDPROPERTY
-RUN

-SET &PrimaryPropAddr = TRUNCATE(&PrimaryPropAddr);
-SET &PrimaryPropAddrCity = TRUNCATE(&PrimaryPropAddrCity);
-SET &PrimaryPropAddrState = TRUNCATE(&PrimaryPropAddrState);
-SET &PrimaryPropAddrZip = TRUNCATE(&PrimaryPropAddrZip);

-HTMLFORM BEGIN
<html>
<head>
	<script type="text/javascript" src="https://maps.google.com/maps/api/js?sensor=false"></script>
	<script type="text/javascript">
		var geocoder;
		var map;
		var tmpzip = "&PrimaryPropAddrZip.EVAL".trim().substr(0,5);
		var address = "&PrimaryPropAddr.EVAL, &PrimaryPropAddrCity.EVAL, &PrimaryPropAddrState.EVAL ".concat(" ", tmpzip);

		function googleInit() {
			if(address.length<=5)
				return;

			geocoder = new google.maps.Geocoder();
			var myOptions = {
				zoom: 17,
				zoomControl: false,
				zoomControlOptions: {
					style: google.maps.ZoomControlStyle.DEFAULT,
					position: google.maps.ControlPosition.LEFT_CENTER
				},
				rotateControl: false,
				mapTypeControl: false,
				mapTypeControlOptions: {
					style: google.maps.MapTypeControlStyle.DROPDOWN_MENU
				},
				navigationControl: true,
				streetViewControl: true,
				streetViewControlOptions: {
					position: google.maps.ControlPosition.LEFT_CENTER
				},
				mapTypeId: google.maps.MapTypeId.HYBRID
			};

			map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
			if (geocoder) {
				geocoder.geocode({
					'address': address
				}, function(results, status) {
					if (status == google.maps.GeocoderStatus.ZERO_RESULTS) {
						alert("We could not find " + address);
					} else if (status == google.maps.GeocoderStatus.OK) {
						map.setCenter(results[0].geometry.location);

						var infowindow = new google.maps.InfoWindow({
							content: '<i>&Borrower.EVAL</i><hr/><b>' + address + '</b>',
							size: new google.maps.Size(150, 50)
						});

						var marker = new google.maps.Marker({
							position: results[0].geometry.location,
							map: map,
							title: address
						});
						google.maps.event.addListener(marker, 'click', function() {
							infowindow.open(map, marker);
						});

						loadLatLng(address);
					}
				});
			}
		}
	</script>
	<style>
	.map_canvas {
		width: 500px;
		height: 500px;
	}
	</style>
</head>
<body onload="googleInit()">
	<div id="map_canvas" class="map_canvas"></div>
</body>
</html>



- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
 
Posts: 578 | Registered: October 01, 2014Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED]i need to implement google map

Copyright © 1996-2020 Information Builders