I must be missing something.

Right now I have an OpenLayers Map, with 3 'layers' and a base layer.

Each layer load a different content type (attractions, hotels, restaurants).

Works perfectly.

However, all three of these views are loaded with the page. Looking at source I see just rows and rows of features. Which makes the page load time horrible.

Surely, there must be a way so that these views are loaded only when a user clicks on the layer.

Ie, a user clicks on a layer, hit the view with an ajax request, display the results. Instead of all the layers being loaded on the first render.

But I don't see anyway to do it. Has anyone accomplished this? It seems like something that would be built in.

Comments

CLEE25’s picture

Title: What am I missing? » Layer loads on page load?
milos.kroulik’s picture

What do you mean by "clicks on the layer"? Do you mean using Layer switcher?

Also, this doesn't seem to happen any time near, given https://drupal.org/comment/7295216#comment-7295216

CLEE25’s picture

Yes, using the layer switcher. I figured as much, so I ended up just building my own custom map, but thanks for your reply!

m.stenta’s picture

Status: Active » Closed (works as designed)

Cleaning up old issues. Seems like this one is resolved, but feel free to reopen if I'm wrong!