Newbies jmottern Posted June 16, 2011 Newbies Posted June 16, 2011 Hello, I'm trying to embed Google maps into a filemaker solution using the web viewer. This should be relatively straightforward with Google's API V3, but the web viewer is not rendering the map. For now, I'm only trying to get the web viewer to show one of the example maps from the Google maps API website, so I know this is not an issue with a calculation field incorrectly rendering the code. The web address for my web viewer is: "data:text/html," & Localities::Google_map_test where Google_map_test is the field containing the relevant HTML/javascript code. The contents of Google_map_test are: <!DOCTYPE html> <html> <head> <meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> <meta http-equiv="content-type" content="text/html; charset=UTF-8"/> <title>Google Maps JavaScript API v3 Example: Marker Simple</title> <link href="http://code.google.com/apis/maps/documentation/javascript/examples/default.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> <script type="text/javascript"> function initialize() { var myLatlng = new google.maps.LatLng(-25.363882,131.044922); var myOptions = { zoom: 4, center: myLatlng, mapTypeId: google.maps.MapTypeId.ROADMAP } var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); var marker = new google.maps.Marker({ position: myLatlng, map: map, title:"Hello World!" }); } </script> </head> <body onload="initialize()"> <div id="map_canvas"></div> </body> </html> I appreciate any suggestions.
Newbies jmottern Posted June 17, 2011 Author Newbies Posted June 17, 2011 Update: I solved the issue by wrapping the javascript in PHP in order to call the GPS coordinates from Filemaker, and hosting the code with Apache. I wanted to avoid this because the data uri scheme seems to neat and clean, with no need for PHP files external to the Filemaker solution.
Recommended Posts
This topic is 4919 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