Welcome, Guest
Username: Password: Remember me

TOPIC: drawingManager ne fonction pas

drawingManager ne fonction pas 8 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: 8 months 1 week ago by roy2rai. Reason: Modification de code d'erreur
The administrator has disabled public write access.

drawingManager ne fonction pas 2 months 2 days ago #109114

  • granen
  • granen's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 32
  • Karma: 0
Hi

I am interesting in the same function. Did you solve this?

//Erik
The administrator has disabled public write access.

drawingManager ne fonction pas 1 month 4 weeks ago #109254

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6205
  • Thank you received: 787
  • Karma: 238
Salut,
Failed to load resource: the server responded with a status of 404 (CHttpException) http://localhost/limesurvey/upload/templates/imper_survey/template.js
C'est sans doute plus un problème du aux liens générés via Yii.

Quelle est l'adresse d'accès du questionnaire ?

As tu un fichier dans limesurvey/upload/templates/imper_survey/

Denis
The administrator has disabled public write access.
Moderators: Nickko
Time to create page: 0.166 seconds
Donation Image