Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 4222 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hi, I have some html/javascript that I'm trying to display in the webviewer.

This code will display a google map with 6 pins in every browser I've tested it in, but shows a blank page in the WebViewer.

Any idea as to what I need to do to fix this would be really appreciated.

I'm on FMPro11 on Mac OSX Lion.
 
(I removed my GoogleKey, gut this code should still work as v3 doesn't require a key)
 
data:text/html, 
<!DOCTYPE html>
<html>
<head>
	<meta charset='utf-8'>
	<title></title>
	<meta name='viewport' content='initial-scale=1.0, user-scalable=no'>
<style type='text/css'>
 html { height: 100% }body { height: 100%; margin: 0; padding: 0 }#map-canvas { height: 100% }</style> 
 <script src='https://maps.googleapis.com/maps/api/js?&amp;sensor=false'></script>
 <script>
 var geocoder;
 var map;
 function initialize() {
	 geocoder = new google.maps.Geocoder();
	 var latlng = new google.maps.LatLng( 43.670234 , -79.386737 );
	 var mapOptions = { zoom: 11, center: latlng, mapTypeId: google.maps.MapTypeId.ROADMAP }
	 map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions);
	 var locations = [  '229 Ashworth Avenue, Toronto ON',
			'1112 Queen Street East, Toronto ON',
			'889 Yonge Street, Toronto ON',
			'1711 Melrose Avenue, Toronto ON',
			'2500 Yonge Street, Toronto ON',
			'45 First Avenue, Toronto ON' 	]; 
	 var i; 
	 for (i = 0; i < locations.length; i++) {  
		 geocoder.geocode( { 'address': locations }, function(results, status) {  
		 map.setCenter(results[0].geometry.location);
		 var marker = new google.maps.Marker({ map: map, position: results[0].geometry.location });});}}  
 google.maps.event.addDomListener(window, 'load', initialize);  
 </script> 
	</head>
	<body>
		<div id='map-canvas'>
		</div>
	</body>
</html> 
Posted

i had this problem on something i was working on a while ago but dont remember the exact solution. it was using google maps aswell.

 

you might need to include <script type="text/javascript"> after your script src line?

Posted

i just downloaded the FM12 Pro Advanced Mac trial software and opened the database file with the text shown above and it displayed immediately.

 

But on my FM11 Pro Mac it is a blank web viewer.

 

I was told by someone else that it displayed on their FM11 and FM12 Windows version, so I guess there is some bug in FM11 Mac as it pertains to javascript and the web viewer.

Posted

 

i just downloaded the FM12 Pro Advanced Mac trial

 

Really? Where from?

  • 2 weeks later...
Posted

I guess it was "Advanced" that surprised you.

It's just FMPro12, and of course it is available as a 30 day trial from Filemaker.com

 

Regardless my script works fine in v12.

Posted

Idealdata was just challenging your statement about the Advance edition being a demo.

 

FileMaker has never offered a Demo of their Advance or Developer editions of there software.

 

IMO, they are making a BIG mistake by not letting prospective buyers test the Advance edition before they purchase.

This topic is 4222 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.