jimlongo Posted June 22, 2013 Posted June 22, 2013 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?&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>
Gabriel Khaselev Posted June 26, 2013 Posted June 26, 2013 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?
jimlongo Posted June 26, 2013 Author Posted June 26, 2013 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.
IdealData Posted June 27, 2013 Posted June 27, 2013 i just downloaded the FM12 Pro Advanced Mac trial Really? Where from?
jimlongo Posted July 10, 2013 Author Posted July 10, 2013 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.
Lee Smith Posted July 10, 2013 Posted July 10, 2013 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.
jimlongo Posted July 10, 2013 Author Posted July 10, 2013 Thanks Lee, Yes I realized my mistake in saying Advanced.
Recommended Posts
This topic is 4500 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 accountSign in
Already have an account? Sign in here.
Sign In Now