- Timestamp:
- 2019-06-20T22:58:30+12:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/web/interfaces/default/js/map-scripts.js
r33172 r33173 367 367 } 368 368 369 /*if(doc.coords) { 370 //console.log("@@@@ HERE IN doc.coords"); 371 for(var x = 0; x < doc.coords.length; x++) { 372 var coord = doc.coords[x]; 373 var coordInfo = getLatLngForCoord(doc.coords[x]); 374 bounds.extend(new google.maps.LatLng(coordInfo.lat, coordInfo.lng)); 375 } 376 }*/ 377 378 if(doc.mapoverlay) { 379 console.log("@@@@ HERE IN doc.mapoverlay"); 369 if(doc.shapes) { 370 console.log("@@@@ HERE IN doc.shapes"); 380 371 bounds = ShapesUtil.overlayBounds(doc.shapes); 381 372 } … … 501 492 clearInterval(_intervalHandle); 502 493 _intervalHandle = null; 503 /*if(doc.coords) { 504 for(var x = 0; x < doc.coords.length; x++) { 505 var coord = doc.coords[x]; 506 var coordInfo = getLatLngForCoord(doc.coords[x]); 507 _map.panTo(new google.maps.LatLng(coordInfo.lat, coordInfo.lng)); 508 } 509 }*/ 494 510 495 if(doc.shapes) { 511 496 var docShapesBounds = ShapesUtil.overlayBounds(doc.shapes); … … 571 556 572 557 if(!shape.description) { 573 //console.log("@@@@ " + shape.type.toString() + " had no description/label");558 console.log("@@@@ " + shape.type.toString() + " had no description/label"); 574 559 return; 575 560 } … … 609 594 } 610 595 shape.markerInfo = infoWindow; 611 console.log("######## Added markerInfo object to shape");596 //console.log("######## Added markerInfo object to shape"); 612 597 } 613 598 614 599 // This function will create Google Shapes/Overlays and markers out of a given doc JSONNode's doc.mapOverlay 615 600 // (doc.mapOverlay shapes are stored as an array of JSON) and store the shapes/overlays in the doc.shapes array. 616 // Note: doc.coords are just an array of all the coordinates in a doc, not indicating to which shapes they belong.617 // They're only **for searching** - for seaching which coords (hence docs) are in a map.618 601 // Param mainMarker: if set to true, marker is red. If false, marker is blue 619 602 function createShapes(doc, mainMarker)
Note:
See TracChangeset
for help on using the changeset viewer.