2013-06-13 4 views
1

gmaps4rails를 사용하여 응용 프로그램을 만들고 있는데 문제가 하나 있습니다. 지도를 확대 (확대 또는 축소) 할 때 아이콘이 잘립니다.줌에서 자른 마커 아이콘 Google Maps for Rails (gmaps4rails)

def gmaps4rails_marker_picture 
{ 
    "picture" => "/assets/pins/pin_#{tipo_assalto_id}.png",   
    "width" => "32" ,   
    "height" => "32", 
    "marker_anchor" => [12,34], 
    "shadow_picture" => "http://www.google.com/mapfiles/shadow50.png", 
    "shadow_width" => "58" ,  
    "shadow_height" => "42", 
    "shadow_anchor" => [6,38] 

} 
end 

누군가가이 질문에 나를 도울 수 :

Cropped markers

이 마커를 표시하는 나의 방법은?

답변

1

내 얘들 아, 얘들 아, 미안. width와 height를 int 대신 string으로 설정합니다. 수정 :

def gmaps4rails_marker_picture 
{ 
"picture" => "/assets/pins/pin_#{tipo_assalto_id}.png",   
"width" => 32 ,   
"height" => 32, 
"marker_anchor" => [12,34], 
"shadow_picture" => "http://www.google.com/mapfiles/shadow50.png", 
"shadow_width" => 58 ,  
"shadow_height" => 42, 
"shadow_anchor" => [6,38] 
} 
end 
+0

솔루션을 찾았 기 좋았어! 답을 수락하면 다른 사람들이 귀하의 질문을 해결 된 것으로 보게됩니다. – David