Welcome, Guest
Username: Password: Remember me

TOPIC: drawingManager ne fonction pas

drawingManager ne fonction pas 5 months 1 week ago #101557

  • roy2rai
  • roy2rai's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 12
  • Karma: 0
Bonjour

j'ai des modifications au niveau de la page survey_runtime.js j'ai ajouter la fonction drawingManager():
var drawingManager = new google.maps.drawing.DrawingManager({
		drawingMode: google.maps.drawing.OverlayType.MARKER,
		drawingControl: true,
		drawingControlOptions: {
		position: google.maps.ControlPosition.TOP_CENTER,
     	drawingModes: [
        google.maps.drawing.OverlayType.MARKER,
        google.maps.drawing.OverlayType.CIRCLE,
        google.maps.drawing.OverlayType.POLYGON,
        google.maps.drawing.OverlayType.POLYLINE,
        google.maps.drawing.OverlayType.RECTANGLE
      ]
    },
    markerOptions: {
      icon: 'images/beachflag.png'
    },
    circleOptions: {
      fillColor: '#ffff00',
      fillOpacity: 1,
      strokeWeight: 5,
      clickable: false,
      editable: true,
      zIndex: 1
    }
  });
google.maps.event.addDomListener(window, 'load', initialize);
de google maps api v3 il me répondre par le message d'erreur suivant:

Failed to load resource: the server responded with a status of 404 (CHttpException) http://localhost/limesurvey/upload/templates/imper_survey/template.js
Warning: you have included the Google Maps API multiple times on this page. This may cause unexpected errors. %7Bmain,drawing%7D.js:47
Uncaught ReferenceError: initialize is not defined survey_runtime.js:220
GMapsInitialize survey_runtime.js:220
(anonymous function) survey_runtime.js:91
d.extend.each jquery.js:16
d.fn.d.each jquery.js:16
(anonymous function) survey_runtime.js:58
f.resolveWith jquery.js:16
d.extend.ready jquery.js:16
c.addEventListener.y

un autre erreur :
/****code*****/
function GMapsInitialize(question,lat,lng) {
 
	var name = question.substr(0,question.length - 2);
	var latlng = new google.maps.LatLng(lat, lng);
 
	var mapOptions = {
		zoom: zoom[name],
		center: latlng,
		mapTypeId: google.maps.MapTypeId.ROADMAP
	};
/****fin******/
Uncaught TypeError: Object #<Event> has no method 'substr' survey_runtime.js:208
GMapsInitialize


Quelqu'un peu m'aidé?
Last Edit: 5 months 1 week ago by roy2rai. Reason: Modification de code d'erreur
The administrator has disabled public write access.
Moderators: Nickko
Time to create page: 0.120 seconds
Donation Image