Ignore:
Timestamp:
2019-06-20T22:58:30+12:00 (5 years ago)
Author:
wy59
Message:

Some cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/web/interfaces/default/js/map-scripts.js

    r33172 r33173  
    367367        }
    368368       
    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");
    380371            bounds = ShapesUtil.overlayBounds(doc.shapes);
    381372        }
     
    501492        clearInterval(_intervalHandle);
    502493        _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         
    510495        if(doc.shapes) {           
    511496            var docShapesBounds = ShapesUtil.overlayBounds(doc.shapes);
     
    571556   
    572557    if(!shape.description) {
    573         //console.log("@@@@ " + shape.type.toString() + " had no description/label");
     558        console.log("@@@@ " + shape.type.toString() + " had no description/label");
    574559        return;
    575560    }
     
    609594    }
    610595    shape.markerInfo = infoWindow;
    611     console.log("######## Added markerInfo object to shape");   
     596    //console.log("######## Added markerInfo object to shape");
    612597}
    613598
    614599// This function will create Google Shapes/Overlays and markers out of a given doc JSONNode's doc.mapOverlay
    615600// (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.
    618601// Param mainMarker: if set to true, marker is red. If false, marker is blue
    619602function createShapes(doc, mainMarker)
Note: See TracChangeset for help on using the changeset viewer.