Author Topic: [MOD]Google Photomap  (Read 131604 times)

0 Members and 1 Guest are viewing this topic.

Offline kubiczek

  • Full Member
  • ***
  • Posts: 211
    • View Profile
    • Gross Peterwitz
Re: [MOD]Google Photomap
« Reply #105 on: December 21, 2010, 10:32:03 PM »
hallo,

ich bin immer noch am rumexperementieren habe

in der Datenbank  noch der Spalte  cat_parent_id nach der cat_id entdeckt , kann man das nicht irgenwie verwenden

um eine Hauptkategorie mit allen unterkategorien auszuwählen.
$query "SELECT * FROM (".IMAGES_TABLE.") WHERE `image_gmap_show` = 1 AND `cat_id` NOT IN (9,10)"



leider bin ich dessen nicht mächtig, es zu implementieren :roll:.

ein experte müsste es sich anschauen. (freiwillige sind herzlich willkommen) :D :D :D




Offline kubiczek

  • Full Member
  • ***
  • Posts: 211
    • View Profile
    • Gross Peterwitz
Re: [MOD]Google Photomap
« Reply #106 on: December 28, 2010, 08:00:18 AM »
Hi,

also wenn du mit dem select nur eine Kategorie haben willst würde ich mal versuchen
das "NOT IN" in ein "IN" zu verwandeln und in der Klammer die eine Kategorie einzutragen.

Nur so eine Idee ob das klappt k.a. :)


Gruß Jens

Hallo,

so hat es nicht geklappt. Hast du noch eine Idee?

es muss eine Hauptkategorie sein selectiert werden, und alle Unterkategorien von der ausgewählten Hauptkategorie  in der Photomap angezeigt werden.

1. index.php?template=google-photo-map-1weltkireg (Hauptkategorie mit Unterkategorien )

2. index.php?template=google-photo-map-2weltkrieg (Hauptkategorie mit Unterkategorien )

3 index.php?template=google-photo-map (alles )

bin am verzweifeln.............

ich denke mann muss in die folgende zeile

$query 
"SELECT * FROM (".IMAGES_TABLE.") WHERE `image_gmap_show` = 1 AND `cat_id` NOT IN (9,10)"


noch

"SELECT * FROM (".categories_TABLE.")     cat_id   und cat_parent_id

einbinden.

Weist du wie man das umsetzten kann?

Rembrandt

  • Guest
Re: [MOD]Google Photomap
« Reply #107 on: December 28, 2010, 12:01:54 PM »


$query 
"SELECT * FROM (".IMAGES_TABLE.") WHERE `image_gmap_show` = 1 AND `cat_id` NOT IN (9,10)";
 


das "AND `cat_id` NOT IN (9,10)";"
ändere in:
AND cat_id IN (".$cat_in.")

und füge vor deiner SQL abfrage diese ein:

$sql 
"SELECT cat_id, cat_parent_id
           FROM "
.CATEGORIES_TABLE.
           WHERE cat_parent_id in ("
.$cat_in.")";
$result $site_db->query($sql); 
	

	
while (
$row $site_db->fetch_array($result)){
	
  
$cat_parent .= ",".$row['cat_id']; 
	
}
	
$cat_in $cat_in.$cat_parent;


"$cat_in" sind deine hauptkategorien

mfg Andi

Offline kubiczek

  • Full Member
  • ***
  • Posts: 211
    • View Profile
    • Gross Peterwitz
Re: [MOD]Google Photomap
« Reply #108 on: December 28, 2010, 11:01:49 PM »
ich habe es jetzt eingebaut wie folgt...


<?php
/**************************************************************************
 *                                                                        *
 *    4images - A Web Based Image Gallery Management System               *
 *    ----------------------------------------------------------------    *
 *                                                                        *
 *             File: google-photo-map.php                                 *
 *        Copyright: (C) 2008 Ingo                                        *
 *            Email: jan@4homepages.de                                    *
 *              Web: http://www.4homepages.de                             *
 *    Scriptversion: 1.7.6                                                *
 *                                                                        *
 *    Never released without support from: Nicky (http://www.nicky.net)   *
 *                                                                        *
 **************************************************************************
 *                                                                        *
 *    Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz-       *
 *    bedingungen (Lizenz.txt) für weitere Informationen.                 *
 *    ---------------------------------------------------------------     *
 *    This script is NOT freeware! Please read the Copyright Notice       *
 *    (Licence.txt) for further information.                              *
 *                                                                        *
 *************************************************************************/

define('ROOT_PATH''./');
include(
ROOT_PATH.'global.php');

function 
parseToXML($htmlStr

$xmlStr=str_replace('<','&lt;',$htmlStr); 
$xmlStr=str_replace('>','&gt;',$xmlStr); 
$xmlStr=str_replace('"','&quot;',$xmlStr); 
$xmlStr=str_replace("'",'&#38;#38;#38;#38;#38;#39;',$xmlStr); 
$xmlStr=str_replace("&",'&amp;',$xmlStr);
return 
$xmlStr


// Select all the rows in the markers table


$sql "SELECT cat_id, cat_parent_id
           FROM "
.CATEGORIES_TABLE.
           WHERE cat_parent_id in ("
.$cat_in.")";
$result $site_db->query($sql); 
	

	
while (
$row $site_db->fetch_array($result)){
	
  
$cat_parent .= ",".$row['cat_id']; 
	
}
	
$cat_in $cat_in.$cat_parent;
	

	

	

$query "SELECT * FROM (".IMAGES_TABLE.") WHERE `image_gmap_show` = 1 AND cat_id IN (".$cat_in.")";
$result mysql_query($query);
if (!
$result) {
  die(
'Invalid query: ' mysql_error());
}

header("Content-type: text/xml ; charset=iso-8859-15");

// Start XML file, echo parent node
echo '<markers>';
// Iterate through the rows, printing XML nodes for each
while ($row = @mysql_fetch_assoc($result)){
  
// ADD TO XML DOCUMENT NODE
  
echo '<marker ';
  echo 
'name="' parseToXML($row['image_name']) . '" ';
  echo 
'address="' parseToXML($row['image_']) . '" ';
  echo 
'lat="' $row['image_gmap_latitude'] . '" ';
  echo 
'lng="' $row['image_gmap_longitude'] . '" ';
  echo 
'kml="' "".ROOT_PATH."data/kml/" $row['image_id'] . ".kml" '" ';
  
$max_length 25// Max. Anzahl der Zeichen in der Bildbeschreibung
  
$description $row['image_description'];
  
$description_short $description;
         if (
strlen($description) > $max_length) {
            
$description_short substr($description0$max_length)." ... ";
         }
  echo 
'desc="' parseToXML($description_short) . '" ';
  echo 
'type="' "".ROOT_PATH."details.php?image_id=" $row['image_id'] . '" ';
  echo 
'thumb="' "".ROOT_PATH."data/thumbnails/" $row['cat_id'] . "/" $row['image_media_file'] . '" ';
  echo 
'cat="' "".ROOT_PATH."categories.php?cat_id=" $row['cat_id'] . '" ';
  echo 
'/>';
}
// End XML file
echo '</markers>';
?>



nur wenn ich jetzt die  Hauptkategorie(506) in das feld CAT_ID eintrage wird nichts in der Google Map angezeigt.
http://grosspeterwitz.org/friedhof/4images/index.php?template=google-photo-map-soldaten-1

bin ich blind? :roll:

gruß



Rembrandt

  • Guest
Re: [MOD]Google Photomap
« Reply #109 on: December 29, 2010, 04:57:03 AM »
...... in das feld CAT_ID eintrage wird nichts in der Google Map angezeigt.
wo trägst du die ein?

du mußt doch den script "google-photo-map.php" die cat_id doch irgendwo übergeben, nur in den script sehe ich nichts davon, oder bin ich blind.  :)



<?php
/**************************************************************************
 *                                                                        *
 *    4images - A Web Based Image Gallery Management System               *
 *    ----------------------------------------------------------------    *
 *                                                                        *
 *             File: google-photo-map.php                                 *
 *        Copyright: (C) 2008 Ingo                                        *
 *            Email: jan@4homepages.de                                    *
 *              Web: http://www.4homepages.de                             *
 *    Scriptversion: 1.7.6                                                *
 *                                                                        *
 *    Never released without support from: Nicky (http://www.nicky.net)   *
 *                                                                        *
 **************************************************************************
 *                                                                        *
 *    Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz-       *
 *    bedingungen (Lizenz.txt) für weitere Informationen.                 *
 *    ---------------------------------------------------------------     *
 *    This script is NOT freeware! Please read the Copyright Notice       *
 *    (Licence.txt) for further information.                              *
 *                                                                        *
 *************************************************************************/

define('ROOT_PATH''./');
include(
ROOT_PATH.'global.php');

function 
parseToXML($htmlStr

$xmlStr=str_replace('<','&lt;',$htmlStr); 
$xmlStr=str_replace('>','&gt;',$xmlStr); 
$xmlStr=str_replace('"','&quot;',$xmlStr); 
$xmlStr=str_replace("'",'&#38;#38;#38;#38;#38;#38;#39;',$xmlStr); 
$xmlStr=str_replace("&",'&amp;',$xmlStr);
return 
$xmlStr


// Select all the rows in the markers table
$cat_in"506"

$sql "SELECT cat_id, cat_parent_id
           FROM "
.CATEGORIES_TABLE.
           WHERE cat_parent_id in ("
.$cat_in.")";
$result $site_db->query($sql); 
	

	
while (
$row $site_db->fetch_array($result)){
	
  
$cat_parent .= ",".$row['cat_id']; 
	
}
	
$cat_in $cat_in.$cat_parent;
	

	
$query "SELECT *
            FROM ("
.IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c)
            WHERE i.image_active = 1 AND i.image_gmap_show = 1 AND c.cat_id = i.cat_id AND i.cat_id IN ("
.$cat_in.")
           "
;
$result mysql_query($query);
if (!
$result) {
  die(
'Invalid query: ' mysql_error());
}

header("Content-type: text/xml ; charset=iso-8859-15");

// Start XML file, echo parent node
echo '<markers>';
// Iterate through the rows, printing XML nodes for each
while ($row = @mysql_fetch_assoc($result)){
  
// ADD TO XML DOCUMENT NODE
  
echo '<marker ';
  echo 
'name="' parseToXML($row['image_name']) . '" ';
  echo 
'address="' parseToXML($row['image_']) . '" ';
  echo 
'lat="' $row['image_gmap_latitude'] . '" ';
  echo 
'lng="' $row['image_gmap_longitude'] . '" ';
  echo 
'kml="' "".ROOT_PATH."data/kml/" $row['image_id'] . ".kml" '" ';
  
$max_length 25// Max. Anzahl der Zeichen in der Bildbeschreibung
  
$description $row['image_description'];
  
$description_short $description;
         if (
strlen($description) > $max_length) {
            
$description_short substr($description0$max_length)." ... ";
         }
  echo 
'desc="' parseToXML($description_short) . '" ';
  echo 
'type="' "".ROOT_PATH."details.php?image_id=" $row['image_id'] . '" ';
  echo 
'thumb="' "".ROOT_PATH."data/thumbnails/" $row['cat_id'] . "/" $row['image_media_file'] . '" ';
  echo 
'cat="' "".ROOT_PATH."categories.php?cat_id=" $row['cat_id'] . '" ';
  echo 
'/>';
}
// End XML file
echo '</markers>';
?>

Offline kubiczek

  • Full Member
  • ***
  • Posts: 211
    • View Profile
    • Gross Peterwitz
Re: [MOD]Google Photomap
« Reply #110 on: December 29, 2010, 04:03:01 PM »
Genial, ohne deine Hilfe hätte ich es nicht Geschaft.

hier das tolle schöne Ergebniss mit viel überblick
http://grosspeterwitz.org/friedhof/4images/index.php?template=google-photo-map-ausser

muss mir noch die tage die Weltkarte einbauen.

gruß mit HOCHACHTUNG

Rembrandt

  • Guest
Re: [MOD]Google Photomap
« Reply #111 on: December 29, 2010, 05:21:15 PM »
np, hauptsache es funktioniert  :)

Offline marcinos

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: [MOD]Google Photomap
« Reply #112 on: December 03, 2011, 02:34:40 PM »
how to do that when you click View in Google Earth, start Google Earth. find locations and photos.

Because far kml file firefox daemon execution as text and not run google earth

or you may need to change something here?

echo 'kml="' . "".ROOT_PATH."data/kml/" . $row['image_id'] . ".kml" . '" ';

Offline Loda

  • Sr. Member
  • ****
  • Posts: 353
    • View Profile
    • Fotosucht Schweiz
Re: [MOD]Google Photomap
« Reply #113 on: December 03, 2011, 02:38:26 PM »
hallo!
seit den letzten Tagen kann ich in der photopmap nicht mehr die roten tropfen sehen.
aufgefallen ist mir das schon in zwei galerien. hat google da etwas verstellt?

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [MOD]Google Photomap
« Reply #114 on: December 03, 2011, 03:59:35 PM »
Hallo Ralf ...

... hier die Original-Adresse der roten Marker : http://labs.google.com/ridefinder/images/mm_20_red.png ...
... und diese Marker werden wohl in google-labs nicht mehr bereit gestellt ...
... du solltest dir eigene Marker speichern und die URL im MOD-Code dementsprechend ändern ...
... ggf. stellte google ja auch neue Marker bereit ... auch dafür wäre dann die URL im MOD-Code zu ändern ...
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline Loda

  • Sr. Member
  • ****
  • Posts: 353
    • View Profile
    • Fotosucht Schweiz
Re: [MOD]Google Photomap
« Reply #115 on: December 03, 2011, 06:12:43 PM »
danke für deine schnelle antwort!
ich werde das mal probieren.. wenn ich hilfe brauche, kann ich dich dann kurz dazu nerven?
 :mrgreen:

Offline luktur

  • Newbie
  • *
  • Posts: 38
    • View Profile
Re: [MOD]Google Photomap
« Reply #116 on: February 18, 2012, 08:08:00 PM »
My map is working but I have big problem:

http://ogk.cal.pl/index.php?template=google-photo-map

When markers are load map is working very slowly. Something is wrong with script.

Offline manica

  • Newbie
  • *
  • Posts: 41
    • View Profile
Re: [MOD]Google Photomap
« Reply #117 on: April 11, 2013, 08:42:16 PM »
Neuerdings schreibt 4images die coordinaten nicht mehr aus dem exiferdaten in die datenbank. Werden sie manuell im Admin eingetragen geht es. Keine Ahnung woran es liegen könnte, suche nun schon eine weile rum

Offline senloel

  • Full Member
  • ***
  • Posts: 196
    • View Profile
Re: [MOD]Google Photomap
« Reply #118 on: August 03, 2014, 12:33:33 PM »
Hi,

habe folgendes Problem:

Ich versuche nun schon seit längerer Zeit, ein Clustering einzubinden.
Dabei habe ich folgende Anleitung gefunden:
http://google-maps-utility-library-v3.googlecode.com/svn/tags/markerclusterer/1.0.2/docs/examples.html

Ich weiß, dass es hier schon einen Cluster-Mod gibt, ich würde aber gerne diese Methode einbauen.

Folgenden Code habe ich in der gm.js geändert:

          var marker = new google.maps.Marker({
            
mapmap,
            
positionpoint,
            
iconicon.icon
          
});
          
bindInfoWindow(markermapinfoWindowhtml);
          
markers.push(marker); // <= Neu
        
}
       var 
markerCluster = new MarkerClusterer(mapmarkers); // <= Neu
      
});
    }


...aber irgendwie will es nicht: Auf der Karte wird nur noch ein einziger Punkt angezeigt.

Kann mir vielleicht jemand weiterhelfen?

Danke und Grüße,
Patrick

Rembrandt

  • Guest
Re: [MOD]Google Photomap
« Reply #119 on: August 03, 2014, 04:18:18 PM »
.... Auf der Karte wird nur noch ein einziger Punkt angezeigt.
....
vor der Schleife fehlt dir:

var markers = [];


mfg Andi