This project is not covered by Drupal’s security advisory policy.
OpenLayers Quick Query: Have you tried using geofield with openlayers_views and a map with 5000 nodes? No? I have and the result is: 280 MB, 2 min load time and all nodes are loaded into memory. But slow is not the entity_load, but the field_attach. With this short module and some custom code you can easily make your layers fast again:
Example
function hook_openlayers_quick_query_info($view) {
if ($view->name == 'my_map') {
// Add wkt field information
$info['wkt_field'] = 'field_geolocation';
// Add needed fields
$info['fields'][] = [
'field_name' => 'field_geolocation'
];
$info['fields'][] = [
'field_name' => 'field_other',
'additional_fields' => TRUE,
];
return $info;
}
}
For a complete example see openlayers_quick_query.api.php.
Explanation
With this little code OL quick query takes over for this map view and the render and field_attach for the data layer view are never called. Instead all processing is done directly via the supplied information.
Assumptions
* You have a geo field called field_geolocation in your content type.
Of course for other projections and maps other parameters might be needed and this really only supports wkt fields at the moment.
You might also consider using an ajax loading for the popup bubbles instead.
Project information
- Minimally maintained
Maintainers monitor issues, but fast responses are not guaranteed. - Maintenance fixes only
Considered feature-complete by its maintainers. - Created by Fabianx on , updated
- This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.
Releases
Initial release compatible with openlayers 7.x-3.2.
Development version: 7.x-1.x-dev updated 1 Mar 2023 at 17:05 UTC