Runs the native code of Google Maps API in a Map control in JavaScript.
This function is mainly used to customize the Map control of WINDEV by proposing features specific to the Google Maps API.
// Centers the map on 45.20,26.51
let sCode = [
var LatLng = new google.maps.LatLng(45.20,26.51);
MapGetJSObject().panTo(LatLng);
]
MapExecuteJS(MAP_MyMap, sCode)
Syntax
<Result> = MapExecuteJS(<Map control> , <JavaScript code>)
<Result>: Character string
- Result of the execution of the JavaScript code to run, if this code returns a result. This result is returned in string format.
- "" (empty string) if the JavaScript code returns no result.
<Map control>: Control name
Name of the Map control to be used.
<JavaScript code>: Character string
JavaScript code to execute. In this code, the name of the JavaScript object representing the Google map is returned by MapGetJSObject.
Remarks
- For more details, see the Google documentation (https://developers.google.com/maps/documentation/javascript/).
- If errors are generated by the code, they can be displayed to the end user and/or prevent the Map control from operating properly.
- The use of Google Maps API is not guaranteed in the future.
- The use of Google Maps API is not compatible with the iOS/Android applications.