Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Google maps with API v3

Featured Replies

  • Newbies

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.

  • Author
  • Newbies

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.

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.