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/gmapsCategory.js

    r7128 r7139  
    11
    22var currentMapLoad;
     3var markerImgProp = [
     4  null,
     5  { w:32, h:32, x:15, y:31 }, // s01
     6  { w:32, h:32, x:15, y:31 }, // s02
     7  { w:32, h:32, x:10, y:31 }, // s03
     8  { w:30, h:40, x:4, y:39 }, // s04
     9];
     10
     11
    312
    413/**
     
    3948  {
    4049    kmlFile=null;
     50  }
     51
     52  re=/^mS(\d\d)_.*/i;
     53  iM=re.exec(properties.markerImg);
     54  if(iM!=null) iM=new Number(iM[1]);
     55
     56  if(iM!=null)
     57  {
     58    map.markerImg = new google.maps.MarkerImage('plugins/GMaps/img/'+properties.markerImg,
     59        new google.maps.Size(markerImgProp[iM].w, markerImgProp[iM].h),
     60        new google.maps.Point(0,0),
     61        new google.maps.Point(markerImgProp[iM].x, markerImgProp[iM].y));
     62  }
     63  else
     64  {
     65    map.markerImg = null;
    4166  }
    4267
     
    149174    );
    150175
     176    if(map.markerImg!=null) marker.setIcon(map.markerImg);
     177
    151178    marker.info=markers[i];
    152179    marker.info.displayed=0;
Note: See TracChangeset for help on using the changeset viewer.