AnsweredAssumed Answered

Mapbox WebViewer in Card Window

Question asked by on Jan 10, 2018
Latest reply on Mar 15, 2019 by TSGal

Hi all,


Trying to view a Mapbox map in a Card Window. In a normal document window the code works fine - but in a card window it looks like the map tiles are failing to load. Below is the basic HTML to create a map.


I have this HTML stored in a text object off-screen and the WebViewer is set to this: "data: text/html;base64," & Base64Encode ( GetLayoutObjectAttribute ( "map_html" ; "content" ) ).


Any thoughts on why the WebViewer is behaving differently in a card window to a normal window? On a Mac, not tested on Windows. In FM16 obv. Pro and Advanced have same issue.


<!DOCTYPE html>
   <meta charset='utf-8' />
   <title>Display a map</title>
   <meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
   <script src=''></script>
   <link href='' rel='stylesheet' />
   body { margin:0; padding:0; }
   #map { position:absolute; top:0; bottom:0; width:100%; }

<div id='map'></div>
mapboxgl.accessToken = 'pk.eyJ1IjoibmVpbHdqc2ltcHNvbiIsImEiOiJjamM5YWwyMjQwbXVqMnFvNGtwNmd5bHh6In0.xIL3015B77N3AwBQXpE1og';
var map = new mapboxgl.Map({
  container: 'map', // container id
  style: 'mapbox://styles/mapbox/streets-v9', // stylesheet location
  center: [-74.50, 40], // starting position [lng, lat]
  zoom: 9 // starting zoom