I am attempting to use the openlayers module as a field formatter for Geo's geo_data fields.
Geo Data is a module that is bundled with Geo, which allows you to import shape files and then create a CCK field that presents users with a selection of its values. For example, you can import a "states" shape file and then allow users to select their state from a dropdown.
When the resulting node is loaded, the field is populated with the WKB of the associated shape. On a node "view" operation, the WKB value is converted to the required format, in this case WKT.
Now, because I'm working with existing data, there's a possibility that the resulting WKT is very large. This should ultimately be corrected by a simplification routine on Geo's end.
However, I also hope that openlayers can deal with the occasional large bundle. In this case I can successfully choose - and render - simple shapes such as "Colorado", "District of Columbia", etc. When I select a non-square state, the openlayers map is positioned at 0,0 and contains no data.
Questions:
1. Are there formats other than WKT that would be more appropriate? geojson? Something else?
2. Is there a known limitation of size of import, and, if so, how can we account for this?
Thanks!
Comments
Comment #1
zzolo commentedHey Allie,
I am not sure about OpenLayers limitations in this area. As far as formats, if OpenLayers supported GeoJSON it would be easier to handle that data, but it would not be more efficient to pass around since it is about the same amount of chacrters. But will check.
Also, since you are getting a point at (0, 0), it makes me think that there is something else wrong here. Are you using the CloudMade layer handling that Jer was talking about here: #485298: CloudMade test extension for Openlayers ?
--
zzolo
Comment #2
zzolo commentedNo response in a month, closing.