Form failure: google is not defined . Google Maps API in Forms

Hi , I am working nice with Camunda , we have a lot process running on that, but we need show a map in a form , when we start a process Tasklist form tab shows an error "Form failure: google is not defined " I asume that is because camunda it doesn’t load api src=“http://maps.googleapis.com/maps/api/js” , could help me to solve that?

here is the code

function initialize() {
  var myLatLng = {lat: -32.984582, lng: -68.788601};
    
  var mapProp = {
    center:myLatLng,
    zoom:14,
    mapTypeId:google.maps.MapTypeId.ROADMAP
  };
  
  var map=new google.maps.Map(document.getElementById("googleMap"), mapProp);  
  
  var marker = new google.maps.Marker({
        position: myLatLng,
        map: map
      });
  
  function addMarker(location) {
      marker.setMap(null);
      marker = new google.maps.Marker({
        position: location,
        map: map
      });
      marker.setMap(map);
    }

  map.addListener('click', function(event) {
      document.getElementById("myLatLng").value = event.latLng;
      addMarker(event.latLng);
  });

}
google.maps.event.addDomListener(window, 'load', initialize);

thanks in advance

Hi Guillermo Huidobro,
If you want to add scripts (to add new AngularJS directives or other libraries) you should add a customScripts property to the app/tasklist/scripts/config.js file

See below links
https://docs.camunda.org/manual/7.4/webapps/tasklist/configuration/#custom-scripts

https://groups.google.com/d/topic/camunda-bpm-users/HxiwfDKEOlY

1 Like