2013-11-23 6 views
1

텍스트가 제대로 정렬되지 않은 특수 마커 클러스터가 있습니다.GMaps4Rails MarkerCluster anchorText

나는 텍스트의 위치를 ​​이동하는 모든 시도 :

Gmaps.map.customClusterer = function() { 

    return [ 
     { 
      textSize: 10, 
      textColor: '#000', 
      url: '<%= asset_path 'grey-dot-2.png' %>', 
      height: 38, 
      width: 38, 
      raw: 'anchorText: [5,0]', 
      anchorText: [5,0], 
      opt_anchorText: [5,0] 
     } 
    ]; 
}; 

을하지만 텍스트는 항상 같은 장소에서 렌더링됩니다. 어떤 생각?

+0

실마리가 없다면 태그를 변경하고 gmaps4rails와 관련이 없으며 google clusterer – apneadiving

+0

apneadiving : 사용자의 의견을 완전히 이해하지 못했습니다. 당신이 올바르게하고 있다고 말하면 문제가 해결되지 않으면 Google 클러스터러에 문제가 있습니까? 나는 또한 왜 태그를 변경하는 것이 도움이 될지 이해하지 못했다. – gfelisberto

+0

Google clusterer의 질문을 해결할 수 없다고합니다. 태그를 변경하면 문제가 해결 될 수있는 가시성을 얻을 수 있습니다. – apneadiving

답변

2

시도 앵커 : [5, 0]

나는 비슷한 문제가 발생하고 있었고, 난 그것을 그냥 사용하는 다른 markerCluster 버전이었다 생각합니다.

+0

잘못된 설명서를 사용하고있었습니다. 사용중인 gmaps4rails 버전은 http://google-maps-utility-library-v3.googlecode.com/svn/tags/markerclustererplus/2.0.14/docs/reference.html – gfelisberto

+0

MarkerClusterPlus docs [link] (http : //google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclustererplus/docs/reference.html)에서는 텍스트를 배치하기위한 anchorText에 대해 이야기하지만 코드는 앵커 태그를 사용합니다 (예 : 간단한 MarkerCluster). 문서를 변경하기 위해 연락하는 방법을 모르십시오 ... – hugsbrugs