在我的项目中,我包括这样的库:
<script src="http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclusterer/src/markerclusterer.js"></script>
Run Code Online (Sandbox Code Playgroud)
但是src路径似乎从昨天开始就被打破了,因此它没有呈现JS,因此我无法在地图上显示簇.
我有这个JS的本地副本,我可以设置src路径来引用我的本地副本而不是上面的../svnt/runk/ ..路径.
我正在搜索的是这个库的替代路径吗?可能是它在CDN上托管.
到目前为止,我认为,上面只是它托管的地方:
参考:https://code.google.com/p/google-maps-utility-library-v3/source/checkout
我正在开发一个小应用程序并实施了Google Maps和Places api.目前我能够在地图上看到我的所有标记,并且群集工作正常.我可以放大群集打开并能够看到标记.我有一个具有不同类型的微调器,一旦选择该类型传递给位置搜索字符串.
这是我的地图代码,包括群集:
public class MapsActivity extends FragmentActivity implements LocationListener,ClusterManager.OnClusterItemInfoWindowClickListener<MyItem> {
GoogleMap mMap;
double myLatitude = 0;
double myLongitude = 0;
HashMap<String, String> mMarker = new HashMap<String, String>();
PlaceJSONParser placeJsonParser = new PlaceJSONParser();
private ClusterManager<MyItem> mClusterManager;
protected MyItem clickedClusterItem;
String[] placeType;
String[] placeTypeName;
Spinner spinPlaceType;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_maps);
// Obtain the SupportMapFragment and get notified when the map is ready to be used.
SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()
.findFragmentById(R.id.map);
mMap = mapFragment.getMap();
onMapReady();
// …Run Code Online (Sandbox Code Playgroud)