Documentation for Geofield Map

We currently have little to no documentation on Geofield Map, which can be potentially confusing for new users of the module for two entirely different reasons. We need to better document how to use Geofield Map, and we need to point users to better, more robust mapping solutions like the Openlayers module if/when they hit the limitations of the bundled module.

I picture this manifesting in a few areas…

User Profile & View Error

When creating a view of user locations, I’m getting the following:

Notice: Undefined index: name in geofield_map_plugin_style_map->render() (line 116 of /home/nas1r0/61/00/8200061/web/sites/all/modules/geofield/modules/geofield_map/includes/geofield_map_plugin_style_map.inc).

Also, on the user profile pages, with geofield map set as the formatter, I get the following:

Notice: Undefined property: stdClass::$title in geofield_map_field_formatter_view() (line 69 of /home/nas1r0/61/00/8200061/web/sites/all/modules/geofield/modules/geofield_map/geofield_map.module).

geofield_compute_values() removing some WKT

I’m having a weird issue and it seems the geofield_compute_values() is doing something weird with my WKT.

I am importing a shapefile into my geofield. I have custom code to do this (hoping to release it soon as a geofield widget). The Shapefile has 4 features, all polygons.

I am trying to combine this into a multipolygon. When I sent the multipolygon feature into geofield_compute_values(), it removed some of the 4th polygon (by far the largest). While poking around, I tried reversing the order of the polygons, so that the largest one was entered first. Strangely, this seemed to preserve the data.

Clearly the order to the features shouldn’t matter. Perhaps I am mangling the data somehow.

I have attached the two MULTIPOLYGON wkt features so that they can be tested. Running them through geofield_compute_values() shoud return the same data but it’s not working for me.

Attachment Size
bad.wkt_.txt 80.81 KB
good.wkt_.txt 80.81 KB

Integration with Google Static Map API

I have created a couple formatters to integrate with the static maps and streetview images from http://code.google.com/apis/maps/documentation/staticmaps/. I pushed it to a sandbox module. Do you think it would make sense as an integrated module (like geofield_maps), or should I create a separate project?

http://drupal.org/sandbox/jlyon/1415810

Move js namespacing to end of mapping.js

In the mapping example code, it’s necessary to renamespace the map variable. This seems to happen because you redeclare the Drupal.mapping namespace later in the main js file after doing your initial namespace. I propose moving the namespaces at the end of the main mapping.js file.

Pages