【问题标题】:Trying to scaleSize a markerimage from a sprite尝试从精灵中缩放标记图像
【发布时间】:2013-02-21 22:05:55
【问题描述】:
var marker = new google.maps.Marker({
        position: new google.maps.LatLng(9.967937,-84.15062),
        draggable: true,
        //icon: marker0000,
        icon: new google.maps.MarkerImage("/static/img/map/markers/1/sprite3.png",    
        new google.maps.Size(40*scaleFactor, 24*scaleFactor), // desired size
        new google.maps.Point(41, offset*scaleFactor), // offset within the scaled sprite
        new google.maps.Point(20*scaleFactor, 12*scaleFactor), // anchor point is half of the desired size
        new google.maps.Size(123*scaleFactor, 52*scaleFactor)), // scaled size of the entire sprite
        map: map
    });

【问题讨论】:

  • 有问题吗?问题陈述?
  • 指向 sprite3.png 的链接也会有所帮助(或显示问题的示例/jsfiddle)。

标签: google-maps sprite freemarker


【解决方案1】:

在精灵缩放上有一个开放的issue report (#4359)。在 2012 年 8 月 19 日的初始报告之后没有任何人进行任何活动。如果这是您遇到的问题,您可以“加星标”该问题。

【讨论】:

  • 是一个问题,我在精灵和标记中也是编程新手
猜你喜欢
  • 2012-09-26
  • 2011-01-26
  • 2011-10-12
  • 1970-01-01
  • 2020-12-02
  • 2020-11-26
  • 1970-01-01
  • 2023-03-07
  • 2019-04-15
相关资源
最近更新 更多