Esempio n. 1
0
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")
Esempio n. 2
0
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")