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.

Comments

lupus78’s picture

I haven't check if it works or not, but i would need this feature also. Is it possible this or any other way?

darrenmothersele’s picture

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.

fuldespanto’s picture

No solution yet, not even workaround :-(

rhimes’s picture

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.

husztisanyi’s picture

Title: Accessing to markers location info by GMap Views » Site-wide map
Assigned: Unassigned » husztisanyi

I'm looking for the same solution.

darrenmothersele’s picture

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.