javascript - Filemaker - Adding a button to infoWindow in GoogleMaps API v3 via web viewer to change layout -


i have looked far , wide answer question stuck. want have map populate webviewer using google maps api v3.

i have populated marker , on clicking marker, infowindow displayed. within infowindow, button used (hopefully) accomplish goal.

at point, unable button @ all. have tried using responses questions similar 1 have had no luck. need know if can navigate through layouts directly web viewer , again.

i.e. map display, populated markers of clients within 10 km radius. infowindow display client info such name address , other relevant info. can (mostly) however, need accomplish button or link within info window when clicked navigate layout within filemaker display clients record.

can achieved? , if so, how this?

i have included current version of code.

    <!doctype html> <html>   <head>     <style type="text/css">       html, body, #map-canvas { height: 100%; margin: 0; padding: 0;}     </style>     <script type="text/javascript"       src="https://maps.googleapis.com/maps/api/js?key=using valid api key here">     </script>     <script type="text/javascript">       function initialize() {   var mylatlng = new google.maps.latlng(-34.397,150.644);   var mapoptions = {     zoom: 4,     center: mylatlng   }   var map = new google.maps.map(document.getelementbyid('map-canvas'), mapoptions);    var contentstring = '<div id="content">'+       '<div id="sitenotice">'+       '</div>'+       '<h1 id="firstheading" class="firstheading">tony mcshane</h1>'+       '<div id="bodycontent">'+       '<p><b>tony</b>, referred <b>epic douchebag</b>, dude cranny' +       '</p>'+       '<div id="button_div" style="text-align:centre">'+       '<button id="mybtn" onclick="<a href=fmp://www.myurlhere.com/icompli%20auditor%20_tenancy%20lite%20metcash%20upgrade.fmp12?script=goto_icompli%20map%20info%20window%20button%20click%20test type="button">click me!</button>'+       '</div>'+       '</div>'+       '</div>';    var infowindow = new google.maps.infowindow({       content: contentstring    });    var marker = new google.maps.marker({       position: mylatlng,       map: map,       title: 'tony mcshane, have failed database'   });    google.maps.event.addlistener(marker, 'click', function() {     infowindow.open(map,marker);   });  }  }  google.maps.event.adddomlistener(window, 'load', initialize);  google.maps.event.addlistener(infowindow, 'domready', function() {       google.maps.event.adddomlistener(mybtn, 'click', function() {          alert("this worked");       });     });       </script>    </head>   <body> <div id="map-canvas"></div>   </body> </html> </script>   </head>   <body> <div id="map-canvas"></div>   </body> </html> 

yes, supported. piece you're missing the fmp:// protocol, acts bridge between web viewer , native filemaker. enables calling filemaker scripts directly javascript code.

in javascript (wherever want call filemaker script), set web viewer's location property valid fmp url. fmp protocol lets specify script invoke , parameter passing. once validly set up, works well. here's detailed overview of how set up.


Comments

Popular posts from this blog

apache - PHP Soap issue while content length is larger -

asynchronous - Python asyncio task got bad yield -

javascript - Complete OpenIDConnect auth when requesting via Ajax -