Multiple trails on a map plotted as points

Events happening in the community are now at Drupal community events on www.drupal.org.
ChocolateTeapot's picture

I'm currently plotting trails on a map, one trail per node, saved as something like
GEOMETRYCOLLECTION(LINESTRING(-3.6639404295406 55.103516056504,-3.7765502928173 55.1584739823,-3.8204956053156 55.196115705011,-3.7930297850042 55.222757086506,-3.7545776365682 55.210222186813,-3.6611938475094 55.101944718278))

I'd like to show multiple trails on a map, which would represent a collection of nodes, but just as a point, for example the start point, presumably in this instance the point -3.6639404295406 55.103516056504.

Is this feasible with any of the location/mapping modules?

Thanks.

Comments

OpenLayers

zzolo's picture

OpenLayers Views supports using an arbitrary WKT field to show on a map.

--
zzolo

How to create a View?

ChocolateTeapot's picture

I've used OpenLayers WKT field to hold the data and OpenLayers to create the trail in the node add and node edit pages and to display the trail in the node page, so I'd quite like to stick to OpenLayers. Presumably I have to anyway as I've used OpenLayers WKT field to hold the data??

I've created a view and within defaults I've included the field that holds the trail, linked it to its node and formatted as OpenLayersMap.

I want a page that shows a point that represents the location of the trails of all nodes, not just one node.

I've then created a page that points to allwalks, overridden the style as OpenLayers Map. A map shows on this page, but there are no points on it.

Just to reiterate,
1) Each node has one, and only one, trail. When you visit the nodes page, the map is displayed using an OpenLayers preset along with a description of the walk
2) I want to show all walks as points on one map. The user clicks on the point for a given trail and is taken to the node page
3) These trails are paths and as such are being saved in the format
GEOMETRYCOLLECTION(LINESTRING(-3.6639404295406 55.103516056504,-3.7765502928173 55.1584739823,-3.8204956053156 55.196115705011,-3.7930297850042 55.222757086506,-3.7545776365682 55.210222186813,-3.6611938475094 55.101944718278))
I want to represent each trail as a point (not the trail itself but just the start of the trail) on the map for an overview of all trails.

Any help appreciated, thanks.

You can do it with

plopesc's picture

You can do it with Mapstraction CCK module too...

--
Pablo López, Drupal developer
https://twitter.com/plopesc

Mapstraction CCK can display multiple objects

sano's picture

...including multiple LINESTRINGs. Just make sure you have set "unlimited" in the "Number of values" field of the "Global settings" section of the page shown when clicking the "Configure" hyperlink of the "Geospatial data" CCK field of your content type.

Standard location

raintonr's picture

If you just want to show nodes as points on a map, surely the basic location module integrated with Gmap will do just that?

So assign a location to each node you are trying to show and job done. Or have I missed something?

Location and Mapping

Group organizers

Group categories

Wiki type

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: