bradcornford/Googlmapper

How can i show 6k markers in map?

hermesalvesbr opened this issue · 4 comments

Hi,

I'm trying do show 6k markers in map, but the show only until 240 markers.
Captura de Tela 2019-12-15 às 10 43 59

240 markers:
Captura de Tela 2019-12-15 às 10 45 28

6k markers:
Captura de Tela 2019-12-15 às 10 46 20

Message error:
Uncaught SyntaxError: missing ) after argument list
jquery-migrate-3.0.0.min.js:2 JQMIGRATE: Migrate is installed, version 3.0.0
2mapa:1 Unchecked runtime.lastError: The message port closed before a response was received.

Hi,

You probably want to create a map wit no markers, then on load, create an AJAX call to an endpoint to request the the markers, and add them that way. If you don't you'll end up with your browser hanging awaiting the response from the server with a large numbers of markers. Also performance of the map will be terrible if you dont use marker clusters.

$mapper = Mapper::map(-7.5771271, -40.4983011, ['zoom' => 15, 'center' => false, 'marker' => true, 'type' => 'HYBRID', 'overlay' => 'TRAFFIC']);
$resultado = Referencia::select('*')->limit(2000)->get();

Marker = true, but didn't work.

$mapper = Mapper::map(-7.5771271, -40.4983011); $resultado = Referencia::select('*')->limit(3000)->get(); // foreach ($resultado as $value) { $conteudo = $value->placa ." <br/>". $value->barramento ." <br/>Endereço: ". $value->endereco; Mapper::informationWindow($value->latitude, $value->longitude, $conteudo); } return view('mapa');

I'm trying this, but didn't work again.