Changeset 282


Ignore:
Timestamp:
03/01/10 14:26:31 (2 years ago)
Author:
takanori
Message:

set custom marker image

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Products.ATGoogleMaps/trunk/Products/ATGoogleMaps/skins/ATGoogleMaps/atgooglemaps.js.dtml

    r272 r282  
    3434 
    3535function createMarker(map, lat, lng, marker_id, title) { 
     36    <dtml-with "_['gmap_marker.png']" only> 
     37    var icon = new google.maps.MarkerImage("&dtml-absolute_url;", 
     38        new google.maps.Size(&dtml-width;, &dtml-height;), 
     39        new google.maps.Point(0, 0), 
     40        new google.maps.Point(10, 34)); 
     41    </dtml-with> 
     42    <dtml-with "_['gmap_shadow.png']" only> 
     43    var shadow = new google.maps.MarkerImage("&dtml-absolute_url;", 
     44        new google.maps.Size(&dtml-width;, &dtml-height;), 
     45        new google.maps.Point(0, 0), 
     46        new google.maps.Point(10, 34)); 
     47    </dtml-with> 
     48 
    3649    var marker = new google.maps.Marker({ 
    3750        position: new google.maps.LatLng(lat, lng), 
    3851        map: map, 
    39         title: title 
     52        title: title, 
     53        icon: icon, 
     54        shadow: shadow 
    4055    }); 
    4156 
     
    6075    return marker; 
    6176} 
    62  
    63 var url = "<dtml-var portal_url>" 
    64  
    65 /* 
    66 // Create marker icon 
    67 var icon = new GIcon(); 
    68 icon.image = url + "/gmap_marker.png"; 
    69 icon.shadow = url + "/gmap_shadow.png"; 
    70 icon.iconSize = new GSize(20, 34); 
    71 icon.shadowSize = new GSize(37, 34); 
    72 icon.iconAnchor = new GPoint(9, 34); 
    73 icon.infoWindowAnchor = new GPoint(9, 2); 
    74  
    75 // Create center marker icon 
    76 var center_icon = new GIcon(); 
    77 center_icon.image = url + "/centermarker.png"; 
    78 center_icon.shadow = url + "/centermarker_shadow.png"; 
    79 center_icon.iconSize = new GSize( 23 , 23 ); 
    80 center_icon.shadowSize = new GSize( 29 , 29 ); 
    81 center_icon.iconAnchor = new GPoint( 11 , 11 ); 
    82  
    83 */ 
Note: See TracChangeset for help on using the changeset viewer.