Google 标记簇在哪里?
Where is the Google Marker Cluster?
适应了Google到Git的新动作后,还有一个问题。
http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclustererplus/images/m1.png Failed to load resource: the server responded with a status of 404 (Not Found)
我应该怎么做才能在地图上呈现标记集群,而不是 ?
?
我正在使用咖啡脚本:
class RichMarkerBuilder extends Gmaps.Google.Builders.Marker #inherit from builtin builder
#override create_marker method
create_marker: ->
options = _.extend @marker_options(), @rich_marker_options()
@serviceObject = new RichMarker options #assign marker to @serviceObject
rich_marker_options: ->
marker = document.createElement("div")
marker.setAttribute 'class', 'marker_container'
marker.innerHTML = @args.title
_.extend(@marker_options(), { content: marker })
infobox: (boxText)->
content: boxText
pixelOffset: new google.maps.Size(-140, 0)
boxStyle:
width: "300px"
# override method
create_infowindow: ->
return null unless _.isString @args.infowindow
boxText = document.createElement("div")
boxText.setAttribute("class", 'marker_info_box') #to customize
boxText.innerHTML = @args.infowindow
@infowindow = new InfoBox(@infobox(boxText))
@buildMap = (markers)->
handler = Gmaps.build 'Google', { builders: { Marker: RichMarkerBuilder} } #dependency injection
#then standard use
handler.buildMap { provider: {}, internal: {id: 'map'} }, ->
markers = handler.addMarkers(markers)
handler.bounds.extendWith(markers)
handler.fitMapToBounds()
下载此图像并将其包含在您的项目中:https://cdn.rawgit.com/googlemaps/js-marker-clusterer/gh-pages/images/m1.png
搜索(在大多数 IDE 上为 CTRL+SHIFT+F,取决于您使用的 IDE/platform)您的整个项目,包括此字符串“http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclustererplus/images/m1.png”的库
用 link 替换下载的图片。
(请不要直接从 https://cdn.rawgit.com...问题。只需在项目的图像文件之间下载它并从那里引用它)
适应了Google到Git的新动作后,还有一个问题。
http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclustererplus/images/m1.png Failed to load resource: the server responded with a status of 404 (Not Found)
我应该怎么做才能在地图上呈现标记集群,而不是 ?
?
我正在使用咖啡脚本:
class RichMarkerBuilder extends Gmaps.Google.Builders.Marker #inherit from builtin builder
#override create_marker method
create_marker: ->
options = _.extend @marker_options(), @rich_marker_options()
@serviceObject = new RichMarker options #assign marker to @serviceObject
rich_marker_options: ->
marker = document.createElement("div")
marker.setAttribute 'class', 'marker_container'
marker.innerHTML = @args.title
_.extend(@marker_options(), { content: marker })
infobox: (boxText)->
content: boxText
pixelOffset: new google.maps.Size(-140, 0)
boxStyle:
width: "300px"
# override method
create_infowindow: ->
return null unless _.isString @args.infowindow
boxText = document.createElement("div")
boxText.setAttribute("class", 'marker_info_box') #to customize
boxText.innerHTML = @args.infowindow
@infowindow = new InfoBox(@infobox(boxText))
@buildMap = (markers)->
handler = Gmaps.build 'Google', { builders: { Marker: RichMarkerBuilder} } #dependency injection
#then standard use
handler.buildMap { provider: {}, internal: {id: 'map'} }, ->
markers = handler.addMarkers(markers)
handler.bounds.extendWith(markers)
handler.fitMapToBounds()
下载此图像并将其包含在您的项目中:https://cdn.rawgit.com/googlemaps/js-marker-clusterer/gh-pages/images/m1.png
搜索(在大多数 IDE 上为 CTRL+SHIFT+F,取决于您使用的 IDE/platform)您的整个项目,包括此字符串“http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclustererplus/images/m1.png”的库
用 link 替换下载的图片。
(请不要直接从 https://cdn.rawgit.com...问题。只需在项目的图像文件之间下载它并从那里引用它)