Site-wide map
fuldespanto - January 22, 2008 - 13:16
| Project: | cck_map |
| Version: | 5.x-3.3 |
| Component: | Miscellaneous |
| Category: | support request |
| Priority: | normal |
| Assigned: | husztisanyi |
| Status: | active |
| Issue tags: | Newbie |
Jump to:
Description
Hi, I wonder if the locative information of the markers entered on a cck_map can be read by a GMap View. I intend to show all cck_map markers on a single GMap View. I' newbie and I don't really know if this issue should be a support request or a feature request or I am totally missing the point, so excuses go in advance.

#1
I haven't check if it works or not, but i would need this feature also. Is it possible this or any other way?
#2
did you find a solution to this?
or maybe there's another way to do this? I want to create a map of all the nodes that have cck_map fields.
#3
No solution yet, not even workaround :-(
#4
I would like this as well -
I'm looking for a way to have/let each user post a marker on their own "personal" map displayed on their profile - but then a have a "site-wide map" show all of the markers from all users who supplied their "personal" markers.
#5
I'm looking for the same solution.
#6
dodgy workaround. create the following as a page, PHP input format:
<script type="text/javascript" src="http://www.google.com/jsapi?key=ABQIAA---replace-this-with-your-google-api-key---blJGK9ao3KxA"></script>
<script type="text/javascript">
function createMarker(point,html) {
var marker = new GMarker(point);
GEvent.addListener(marker, "click", function() {
marker.openInfoWindowHtml(html);
});
return marker;
}
google.load("maps", "2.x");
// Call this function when the page has been loaded
function initialize() {
var map = new google.maps.Map2(document.getElementById("map")); map.addControl(new GLargeMapControl());
map.addControl(new GMapTypeControl());
map.setCenter(new google.maps.LatLng(54.342149, -3.867187), 6);
<?php
$result = db_query('SELECT ctb.nid, n.title, ctb.field_group_location_lat as lat, ctb.field_group_location_lon as lon FROM {content_type_somethingwithcckmap} ctb INNER JOIN {node} n ON ctb.nid = n.nid WHERE ctb.field_group_location_lat <> 0 and ctb.field_group_location_lon <> 0');
while ($node1 = db_fetch_object($result)) {
?>
var point = new GLatLng(<?php print $node1->lat ?>, <?php print $node1->lon ?>);
var marker = createMarker(point,'<a href="/node/<?php print $node1->nid ?>"><?php print $node1->title ?></a>')
map.addOverlay(marker);
<?php
}
?>
}
google.setOnLoadCallback(initialize);
</script>
<div id="map" style="width:590px;height:500px;"></div>
updating the SQL to match whatever content type name and field names you have setup.