04-09-2017 09:54 PM
Hi guys, i've been triying to resolve my problem to use a dinamic Google Maps API V3 on LabVIEW based on JavaScript method on Google Developer example and projected it into LabVIEW IWebBrowser2. It always shows that the script is error, but when i open it on chrome and edge, there are no problem viewing the file. when i try to viewed it on IE it works but there is some blocked based on the ActiveX. is there any clue for the setting on "invoke node" or "property node" on IWebBrowser2?
This is my VI and HTML script
<!DOCTYPE html> <html> <head> <meta name="viewport" content="initial-scale=1.0, user-scalable=no"> <meta charset="utf-8"> <title>Simple Polylines</title> <style> /* Always set the map height explicitly to define the size of the div * element that contains the map. */ #map { height: 100%; } /* Optional: Makes the sample page fill the window. */ html, body { height: 100%; margin: 0; padding: 0; } </style> </head> <body> <div id="map"></div> <script> // This example creates a 2-pixel-wide red polyline showing the path of William // Kingsford Smith's first trans-Pacific flight between Oakland, CA, and // Brisbane, Australia. function initMap() { var map = new google.maps.Map(document.getElementById('map'), { zoom: 3, center: {lat: 0, lng: -180}, mapTypeId: 'terrain' }); var flightPlanCoordinates = [ {lat: 37.772, lng: -122.214}, {lat: 21.291, lng: -157.821}, {lat: -18.142, lng: 178.431}, {lat: -27.467, lng: 153.027} ]; var flightPath = new google.maps.Polyline({ path: flightPlanCoordinates, geodesic: true, strokeColor: '#FF0000', strokeOpacity: 1.0, strokeWeight: 2 }); flightPath.setMap(map); } </script> <script async defer src="https://maps.googleapis.com/maps/api/js?key=AIzaSyC2dWzXq8LCy3Gp1b6QodeCqX5DwuqAgw8&callback=initMap"> </script> </body> </html>
04-10-2017 11:58 AM
When I open up the script in chrome and open the console using F12, I see some error messages. Could the issue be with Google blocking access to some resource?
04-10-2017 05:40 PM
dear SalazarJ,
could you have a screenshot of it? because when i press F12 on it, there is no error on console tab
04-11-2017 03:01 PM
The errors in my console tab can be seen below