def getGrid(request, zoom, gridSize=256): clusterer = MapClusterer() clustercells, filters = clusterer.getClusterParameters(request,int(zoom), int(gridSize)) grid = clusterer.gridCluster(clustercells,filters,int(zoom), int(gridSize)) return HttpResponse(simplejson.dumps( grid ), content_type="application/json")
def getPins(request, zoom, gridSize=512): clusterer = MapClusterer() clustercells, filters = clusterer.getClusterParameters(request,int(zoom),int(gridSize)) markers = clusterer.kmeansCluster(clustercells,filters,int(zoom), int(gridSize)) return HttpResponse(simplejson.dumps( markers ), content_type="application/json")