G'Day,

Sorry for the disorientation, but perhaps someone could explain how/if Location can be used to provide KML files to mashup with the standard GMap basemap? I have searched the Issues for "KML" = 0 hits... so here goes:

In my experience, the process of geo-location often requires a user to have more information than is provided by a simple google map (think sector/context specific: eg, scientific research areas...user defined/abstract boundaries). Without these boundaries, the user cannot decide where to click to geocode their current content item since their frame of reference is not part of the Google base maps.

It seems to me that Location could provide a pathway: Gmap base layer + KML overlays = robust locative solution

I have a pile of KML files (shapes) that I can publish as node attachments (?). How? Am I missing an obvious answer?

If not, here is a usecase:

A. Make KMLs available to GMap:

1. Going to the Location configuration interface, under the [Map Links] tab, perhaps there is a new section that allows for "User Defined Overlays" I could either specify a content type that was dedicated to storing my KML collection, or I could point to a file directory where they are all stored.

2. In case there are many KMLs to manage, the user could choose to "add another" kml collection (and name/tag it).

B. Specify KML collection in node edit

3. The GMap module loads as normal, but under the map is a new select list to "choose user defined overlays"

4. The user points to a collection, and a new routine now runs. The specified KML collection is loaded into the google map api (?) and then the current GMap extent is drawn, with the KML files overlayed (to the extent they are visible)

C. Encode the GMap macro

5. The GMap module now needs to carry the additional KML information.

So this has connections with GMap (obviously?) but perhaps this is a good place to ask for more direction/discussion.

Thanks indeed,

JB

CommentFileSizeAuthor
#5 gmap_attachments.tgz883 bytesboabjohn

Comments

tirdadc’s picture

I've been trying to achieve this (KML files + regular markers on a same node) without much success using gmap_overlays, which is included in GMap Addons. Not sure how well it fits in with what Location ends up outputting for Google Maps to process and the documentation is rather cryptic, so I'm going to try another angle. I'll be sure to report back if anything comes of it.

yesct’s picture

Status: Active » Postponed
Issue tags: +location cool idea

sounds like a cool idea. Tagging. Since there has not been too much response, I'll mark it postponed. If someone wants to post a patch to get it to work, please do!

mvc’s picture

This isn't directly related to the use case you were describing, but if you would also like to use Drupal to generate KML files based on location data, please see #558144: Output KML-compatible decimal degrees.

OpenSourcer’s picture

Hi John

Did you come right with this?? Im trying to do the same thing but dont have any idea how to overlay a KML plus regular markers on the same node. And gmap_overlays should be able to do this but there is just no documentation. However, I can tell you that in addition to Terrain, Map, Hybrid, I inserted Earth. Then I created a macro as follows and I get the KML. But as you said it correctly, I want it displayed with the regular markers on the original node:

My macro:

[gmap |overlay=kml:http://www................../gcs.kml |width=700px |height=500px |control=Small |type=Earth |behavior=+autozoom +notype]

boabjohn’s picture

StatusFileSize
new883 bytes

Howdy all,

This was a long way back, and I'm deep in another project at the moment, but here are two possible points of assistance:

1. The very lovely Dan Karran helped me out with a custom module that defines a kml file attachment type. It will display one or more KML files (multiple oiverlays) onto a single node's gmap display. Attached below as a community share...Dan is not responsible for supporting this module: enjoy on your own steam!

2. More generally, I had success with Views. Sset up your View using the GMap display plugin. Then put your customised (kml enhanced) GMap macro into the configuration option for the GMap display. This gives you Views-filtered points displayed on a given macro. There might be even more clever things that could be done with tokens, or not, depending on when all that gets expanded/rendered...and that is quite beyond my skill level to advise on.

Hope that helps...

JB

ankur’s picture

Status: Postponed » Closed (won't fix)

This sounds like a nice feature. If there's still a request for it, it should probably go into a separate plugin in 7.x-4.x.