Ignore:
Timestamp:
Oct 9, 2010, 9:55:26 PM (14 years ago)
Author:
grum
Message:

add marker style management + minor bugs fixed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/GMaps/js/gmapsPicture.js

    r7125 r7139  
    44  meta:false
    55};
     6var markerImgProp = [
     7  null,
     8  { w:32, h:32, x:15, y:31 }, // s01
     9  { w:32, h:32, x:15, y:31 }, // s02
     10  { w:32, h:32, x:10, y:31 }, // s03
     11  { w:30, h:40, x:4, y:39 }, // s04
     12];
     13
    614
    715function applyMap(properties)
     
    2634  );
    2735
    28   if(properties.marker)
    29   {
    30     var marker = new google.maps.Marker(
    31       {
    32         position:latlng,
    33         map: map,
    34         title:properties.markerTitle
    35       }
    36     );
    37   }
     36
     37  var marker = new google.maps.Marker(
     38    {
     39      position:latlng,
     40      map: map,
     41      title:properties.markerTitle
     42    }
     43  );
     44
     45
     46  re=/^mS(\d\d)_.*/i;
     47  iM=re.exec(properties.markerImg);
     48  if(iM!=null) iM=new Number(iM[1]);
     49
     50  if(iM!=null)
     51  {
     52    var markerImg = new google.maps.MarkerImage('plugins/GMaps/img/'+properties.markerImg,
     53        new google.maps.Size(markerImgProp[iM].w, markerImgProp[iM].h),
     54        new google.maps.Point(0,0),
     55        new google.maps.Point(markerImgProp[iM].x, markerImgProp[iM].y));
     56    marker.setIcon(markerImg);
     57  }
     58
     59
     60
     61
    3862
    3963  if(properties.kmlFileUrl!='')
Note: See TracChangeset for help on using the changeset viewer.