Changeset 7793


Ignore:
Timestamp:
Apr 16, 2010, 4:31:42 PM (15 years ago)
Author:
janveeden
Message:

David: Fixed the lat long issue. Typecast to number was need. Your circles are now on map. Please fix them to the background, and make the hiding at start.

Location:
trunk/src/map/inc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/map/inc/nodemapWL.js

    r7786 r7793  
    44var marker_hash = {};
    55var markerArray = new Array();
     6var circleArray = new Array();
    67var xmlhttp;
    78var targetDiv = "infotop";
     
    3637         * Hier zo circles toevoegen.
    3738         */
     39        for(var  i=0; i<circleArray.length; i++) {
     40                map.addOverlay(circleArray[i]);
     41        }
    3842       
    3943        var markerClusterer = new MarkerClusterer(map, markerArray);
     
    4953function addMarker(current, i) {
    5054        var id = current.id;
     55        var latitude = Number(current.latitude[0]);
     56        var longitude = Number(current.longitude[0]);
     57        var circle = drawCircle(latitude, longitude, 2.0, "#6C3", 1, 0.75, "#0F0",.2);
    5158        var marker  = new GMarker(new GLatLng(current.latitude[0], current.longitude[0]), {title: current.name[0], icon: greenIcon});
     59       
    5260        //Added mouseover listener that calls on our mouseOver function when the mouse moves over a marker on the map
    5361        GEvent.addListener(marker, 'mouseover', function() {
     
    6371       
    6472        markerArray.push(marker);
     73        circleArray.push(circle);
    6574        return marker;
    6675}
     
    104113                *Hieronder verdergaan met dekking
    105114                */
    106                 drawCircle(lat, longitude, 2.0, "#6C3", 1, 0.75, "#0F0",.2);    
     115                       
    107116        }       
    108117}
     
    151160//Our click function for Cluster nodes. 'markers' is an array containing all markers within the cluster
    152161function clickCluster(markers)
    153 {
     162{       
     163        if(selected == true)
     164                deselect();
     165       
    154166        //Let the rest of the program know that something is selected
    155167        select();
  • trunk/src/map/inc/overlay.js

    r7778 r7793  
    1515
    1616    polygon = new GPolygon(Cpoints, strokeColor, strokeWidth, strokeOpacity, fillColor, fillOpacity);
    17     map.addOverlay(polygon);
     17    return polygon;
    1818   }
Note: See TracChangeset for help on using the changeset viewer.