• [MOD] Google-Maps Integration V.01 5 0 5 1
Currently:  

Author Topic: [MOD] Google-Maps Integration V.01  (Read 254579 times)

0 Members and 2 Guests are viewing this topic.

Offline bergblume

  • Sr. Member
  • ****
  • Posts: 463
  • on to the top!
    • View Profile
Re: [MOD] Google-Maps Integration V.01
« Reply #210 on: November 21, 2013, 06:46:57 PM »
how can I add this mod? because google maps javascript v3 don't use api key...

Berechtigte Nachfrage!
Gibt es hierzu schon eine Lösung, daß der Mod auch googlemaps v3 kompatibel ist?
Was muss hierzu geändert werden?

Rembrandt

  • Guest
Re: [MOD] Google-Maps Integration V.01
« Reply #211 on: November 22, 2013, 07:29:56 AM »
Hi!
..
Was muss hierzu geändert werden?
Schau dir mal diesen Mod an :
http://www.4homepages.de/forum/index.php?topic=29519.msg157080#msg157080
(Step 9.) und die googlemap.js aus dem Anhang)

mfg Andi

Offline bergblume

  • Sr. Member
  • ****
  • Posts: 463
  • on to the top!
    • View Profile
Re: [MOD] Google-Maps Integration V.01
« Reply #212 on: November 22, 2013, 01:34:31 PM »
Danke dir, Andi!

so wie ich - den bestehenden Code vom  [MOD] Google-Maps Integration V.01 - getestet habe, funktioniert anscheinend auch das automatische "mapping" von der bestehenden googlemaps Api V2  :D
Danke dir auch für deine Ergänzungen bzw. hinweis zum Exif Mod!

Offline bma2004

  • Newbie
  • *
  • Posts: 32
    • View Profile
Re: [MOD] Google-Maps Integration V.01
« Reply #213 on: November 25, 2013, 08:09:21 AM »
Hi!
Yesterday discovered that binding to map stopped working. When installing a marker instead of specifying the coordinates displayed: undefined.

The code have not changed anything. Before everything worked. Google changed something?

Rembrandt

  • Guest
Re: [MOD] Google-Maps Integration V.01
« Reply #214 on: November 25, 2013, 12:47:47 PM »

Offline bma2004

  • Newbie
  • *
  • Posts: 32
    • View Profile
Re: [MOD] Google-Maps Integration V.01
« Reply #215 on: November 25, 2013, 02:04:17 PM »
I replace a key, put a piece of code (step 9) and googlemap.js. as not working and not working
« Last Edit: November 25, 2013, 02:32:38 PM by bma2004 »

Offline bergblume

  • Sr. Member
  • ****
  • Posts: 463
  • on to the top!
    • View Profile
Re: [MOD] Google-Maps Integration V.01
« Reply #216 on: December 02, 2013, 04:57:25 PM »
I replace a key, put a piece of code (step 9) and googlemap.js. as not working and not working

could you solve your problem?

Offline bma2004

  • Newbie
  • *
  • Posts: 32
    • View Profile
Re: [MOD] Google-Maps Integration V.01
« Reply #217 on: December 03, 2013, 12:12:22 PM »
I replace a key, put a piece of code (step 9) and googlemap.js. as not working and not working

could you solve your problem?

My problem in koordinatencheck.html  of MOD (Google-Maps / GPS Integration V1.2).
As far as I understand, Google has changed the syntax and transfer coordinate marker transfer via jquery is not happening.

Offline bergblume

  • Sr. Member
  • ****
  • Posts: 463
  • on to the top!
    • View Profile
Re: [MOD] Google-Maps Integration V.01
« Reply #218 on: December 03, 2013, 02:18:25 PM »
I replace a key, put a piece of code (step 9) and googlemap.js. as not working and not working

could you solve your problem?

My problem in koordinatencheck.html  of MOD (Google-Maps / GPS Integration V1.2).
As far as I understand, Google has changed the syntax and transfer coordinate marker transfer via jquery is not happening.

Yes, you are right - I could dublicate the problem! perhaps Andi can help (us)?!

Rembrandt

  • Guest
Re: [MOD] Google-Maps Integration V.01
« Reply #219 on: December 03, 2013, 08:23:09 PM »
ja, ich murks eh schon herum....

Offline bergblume

  • Sr. Member
  • ****
  • Posts: 463
  • on to the top!
    • View Profile
Re: [MOD] Google-Maps Integration V.01
« Reply #220 on: December 03, 2013, 08:27:28 PM »
ja, ich murks eh schon herum....

naja als "murksen" kann man deine tolle arbeit hier sicherlich nicht bezeichnen  :wink:
« Last Edit: December 05, 2013, 03:33:19 PM by bergblume »

Offline bergblume

  • Sr. Member
  • ****
  • Posts: 463
  • on to the top!
    • View Profile
Re: [MOD] Google-Maps Integration V.01
« Reply #221 on: December 05, 2013, 03:33:08 PM »
evtl. könnte das hier helfen... das "problem" scheint ja zu sein, daß ein undefined statt der koordinaten in der admin/koordinatencheck.html erscheint:

http://www.svensoltmann.de/google-maps-koordinaten.html

Rembrandt

  • Guest
Re: [MOD] Google-Maps Integration V.01
« Reply #222 on: December 05, 2013, 05:44:55 PM »
Hi!

1.) Download the file from the Attachment "googlemap_v3.js" and store it in your Galery "root/js"

2.) search in details.php Step 4.) and replace it with this:

//############################ Start Google Map ################################# 
$google_map="";
if(
$image_row['image_gmap_show'] && $image_row['image_gmap_latitude'] && $image_row['image_gmap_longitude']){

  
$photomap =1// turn photomap off "0"

  
if ($image_row['image_gmap_type'] == 1) {
    
$image_gmap_type "TERRAIN";
  } elseif (
$image_row['image_gmap_type'] == 2) {
    
$image_gmap_type "SATELLITE";
  } elseif (
$image_row['image_gmap_type'] == 3) {
    
$image_gmap_type "HYBRID";
  }
      
  if(
$photomap){
    
$sql "SELECT i.image_id, i.cat_id, i.image_name, i.image_media_file, i.image_thumb_file, i.image_date".$additional_sql."
            FROM "
.IMAGES_TABLE." i
            WHERE image_active = 1 AND cat_id = 
$cat_id
           "
;
    
$result $site_db->query($sql);
    
    
$si=1;  
    while(
$row2 $site_db->fetch_array($result)) {
      
$image_thumb_file get_thumbnail_code($row2['image_media_file'], $row2['image_thumb_file'], $row2['image_id'], $row2['cat_id'], $row2['image_name'], $mode1);
      
      
$contentString "
        '<div style=\"text-align:left; margin:0;padding:0\">'+
          '<p style=\"text-align:left\">"
.$lang['image_gmap_text1']."<b>\"".$row2['image_name']."\"</b></p>'+
          '"
.$image_thumb_file."'+
          '<p style=\"text-align:left\">"
.$lang['image_gmap_text2']." :<br>'+
          '<b>Lat: </b>"
.$row2['image_gmap_latitude']."°<br>'+
          '<b>Lon: </b>"
.$row2['image_gmap_longitude']."°'+
          '</p>'+
        '</div>'"
;
      
      
$locations.= "[".$contentString.",".$row2['image_gmap_latitude'].",".$row2['image_gmap_longitude'].",".$si."],"
      
$si++; 
    } 
  }
  else{
    
$locations "''";
    
$contentString "''";
  }

  
$image_gmap_thumb_file get_thumbnail_code($image_row['image_media_file'], $image_row['image_thumb_file'], $image_row['image_id'], $image_row['cat_id'], $image_row['image_name'], $mode1);
  
$currentContentString "
  '<div style=\"text-align:left; margin:0;padding:0\">'+
    '<p style=\"text-align:left\">"
.$lang['image_gmap_text1']." <b>\"".$image_name."\"</b></p>'+
    '"
.$image_gmap_thumb_file."'+
    '<p style=\"text-align:left\">"
.$lang['image_gmap_text2']." :<br>'+
    '<b>Lat: </b>"
.$image_row['image_gmap_latitude']."°<br>'+
    '<b>Lon: </b>"
.$image_row['image_gmap_longitude']."°'+
    '</p>'+
  '</div>'"
;
    
  
$google_map "
    <script type='text/javascript' src='./js/googlemap_v3.js'></script>
      <script type='text/javascript'>
         photomap = '
$photomap';
         Zoomi = '"
.$image_row['image_gmap_zoom']."';
         MapStyle = '
$image_gmap_type';
         GPSLatitude = '"
.$image_row['image_gmap_latitude']."';
         GPSLongitude = '."
$image_row['image_gmap_longitude']."';
         imagename = '
$image_name';
         contentString = 
$contentString;
         currentContentString = 
$currentContentString;
         thumbnailMarkerUrl = '';
         locations = [
$locations];
      </script>"
;
}   
  
$site_template->register_vars(array(
    
"google_map" => $google_map    
  
));
   
//############################ End Google Map #################################  


3.) search in your templates/details.html "Step.5)" and remove it completly.
 the new "Step 5.)" insert where ever you want:
Code: [Select]
{if google_map}
  <div id="map_canvas" style="width:600px; height:400px; margin:10px 0px;"></div>
 {google_map}
{endif google_map

DEMO zoom in and you can see the  Weather layer and the other Pictures (click on Marker).

mfg Andi
« Last Edit: December 05, 2013, 06:59:51 PM by Rembrandt »

Offline bergblume

  • Sr. Member
  • ****
  • Posts: 463
  • on to the top!
    • View Profile
Re: [MOD] Google-Maps Integration V.01
« Reply #223 on: December 06, 2013, 11:04:13 AM »
sehr genial! Danke dir!
wie müsste denn dann auch noch die admin/koordinatencheck.html abgeändert werden?

aktuell schaut die bei mir und auch bei bma2004 so aus:

Code: [Select]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!-- Dieses Script ist von Erik Groennerud und wurde für die Gallery 4Images programmiert.
12.2007 - www.koelschwasser.de
Version 2.0-->
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title>Google Maps Koordinatensuche</title>
<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=GOOGLEKEY" type="text/javascript"></script>
<script type="text/javascript" src="/admin/scripts/jsr_class.js"></script>
<script type="text/javascript">

function objProperties(myObject){
var out = new Array();
for( property in myObject ) {
out.push(property + " = " + myObject[property]);
}
return out;
}
</script>


<script type="text/javascript">

//<![CDATA[





function load() {
xok=0;
yok=0;
zok=0;

if (GBrowserIsCompatible()) {

zoom=parseInt(opener.document.form.elements['image_gmap_zoom'].value);
if ((zoom < 21) && (zoom > 0))
{
zok = 1;
} else {
zoom = 3;
}
pointy = parseFloat(opener.document.form.elements['image_gmap_latitude'].value);
if ((pointy > -90) && (pointy < 90))
{
yok = 1;
} else {
pointy = 50;
}
pointx = parseFloat(opener.document.form.elements['image_gmap_longitude'].value);
if ((pointx > -180) && (pointx < 180))
{
xok = 1;
} else {
pointx = 9;
}


   map = new GMap2(document.getElementById("map"));
  map.addControl(new GOverviewMapControl());
map.addControl(new GLargeMapControl());
      map.addControl(new GMapTypeControl());
      map.addControl(new GScaleControl());
      map.enableScrollWheelZoom();  
map.addMapType(G_PHYSICAL_MAP);  


  var copycycle1 = "&copy; Cloudmade: ";
  var copycycle2 = "<a href='http://www.cloudmade.com' target='_blank'>";
  var cycle = [new GTileLayer()];
  cycle[0].getTileUrl = function(a,b) {
  return "http://tile.opencyclemap.org/cycle/" + b + "/" + a.x + "/" + a.y + ".png"; };
  cycle[0].getCopyright = function(a,b) {
  return {prefix:copycycle1, copyrightTexts:[copycycle2]}; }
  G_CYCLE_MAP = new GMapType(cycle, G_SATELLITE_MAP.getProjection(), "Cycle-Map", {
  shortName: "Cycle-Map", alt: "Cycle-Map von Cloudmade.com anzeigen",
  minResolution:0,maxResolution:17});
  map.addMapType(G_CYCLE_MAP);

      map.setCenter(new GLatLng(pointy, pointx), zoom, G_PHYSICAL_MAP);
      geocoder = new GClientGeocoder();
      
      
      if ((xok==1) && (yok ==1) && (zok ==1)) {
      
       marker = new GMarker(map.getCenter());
map.addOverlay(marker);

marker.openInfoWindowHtml("<b>Latitude:</b> " + pointy + "<br />" + "Longitude: " + pointx+ "<br />" + "Zoomlevel: " + map.getZoom());
document.getElementById('latitude').value = pointy;
document.getElementById('longitude').value = pointx;
document.getElementById('zoom').value = zoom;

request = 'http://ws.geonames.org/findNearbyPostalCodesJSON?lat=' + pointy + '&lng=' + pointx + '&callback=getLocation';

   // Create a new script object
     aObj = new JSONscriptRequest(request);
   // Build the script tag
  aObj.buildScriptTag();
   // Execute (add) the script tag
   aObj.addScriptTag();
      
      }

   
      
      GEvent.addListener(map, 'click', function(event) {


if (point){
document.getElementById('latitude').value = event.latLng.lat();
document.getElementById('longitude').value = event.latLng.lon();
document.getElementById('zoom').value = map.getZoom();



}


if (marker) {
map.removeOverlay(marker);


} else {
map.clearOverlays();
marker = new GMarker(point);
map.addOverlay(marker);

marker.openInfoWindowHtml("<b>Latitude:</b> " + point.y + "<br />" + "Longitude: " + point.x+ "<br />" + "Zoomlevel: " + map.getZoom());
}

if (point){

   request = 'http://ws.geonames.org/findNearbyPostalCodesJSON?lat=' + point.y + '&lng=' + point.x + '&callback=getLocation';

   // Create a new script object
     aObj = new JSONscriptRequest(request);
   // Build the script tag
  aObj.buildScriptTag();
   // Execute (add) the script tag
   aObj.addScriptTag();

}


}
);
}
}

function addAddressToMap(response) {
      map.clearOverlays();
      if (!response || response.Status.code != 200) {
        alert("Sorry, konnte leider Adresse nicht finden!");
      } else {
        place = response.Placemark[0];
        point = new GLatLng(place.Point.coordinates[1],
                            place.Point.coordinates[0]);
        marker = new GMarker(point);
        map.addOverlay(marker);
      
   marker.openInfoWindowHtml("<b>Latitude:</b> " + point.y + "<br />" + "Longitude: " + point.x+ "<br />" + "Zoomlevel: " + map.getZoom());
   document.getElementById('latitude').value = event.latLng.lat();
document.getElementById('longitude').value = event.latLng.lon();
document.getElementById('zoom').value = map.getZoom();


}}

    function showLocation() {
      var address = document.forms[0].q.value;
      geocoder.getLocations(address, addAddressToMap);
    }
    
    function getLocation(jData) {
    

  if (jData == null) {
    // There was a problem parsing search results
    return;
  }
  
  var html = '';
  var postalCodes = jData.postalCodes;
     var name = postalCodes[0];
     // we create a simple html list with the geonames objects
     // the link will call the center() javascript method with lat/lng as parameter
     html = html + '<a href="javascript:center(' + name.lat +',' + name.lng + ');">' + name.placeName + '</a><br>';

 
    var point = new GLatLng(parseFloat(name.lat), parseFloat(name.lng));
var address = name.placeName + ", "+ name.countryCode;
// Adresse in Suchfeld eintragen
    document.forms[0].q.value = address;
    



map.addOverlay(marker);

marker.openInfoWindowHtml("<b>Latitude:</b> " + pointy + "<br />" + "Longitude: " + pointx+ "<br />" + "Zoomlevel: " + map.getZoom());
var marker = new GMarker(point);                  
           map.addOverlay(marker);
marker.openInfoWindowTabsHtml(infoTabs);



}

function OK() {

opener.document.form.elements['image_keywords'].value = opener.document.form.elements['image_keywords'].value + " " + document.forms[0].q.value;

opener.document.form.elements['image_gmap_latitude'].value= document.forms[0].latitude.value;
opener.document.form.elements['image_gmap_longitude'].value=document.forms[0].longitude.value;
opener.document.form.elements['image_gmap_zoom'].value = document.forms[0].zoom.value;

opener.document.form.elements['image_gmap_type'].value = "3";
opener.document.form.elements['image_gmap_show'][0].checked = true;

self.close();

}


//]]>
</script>
</head>


<body onload="load()" onunload="GUnload()">

<center>
<form action="#" onsubmit="showLocation(); return false;">
      <b>Adresse eingeben oder klicke in Karte:</b><br>
        <input type="text" name="q" value="" class="address_input" size="40" />
        <input type="submit" name="find" value="Search" />




<div id="map" style="width: 500px; height: 500px"></div>


<div>
Breitengrad: <input name="latitude" id="latitude" type="text" />
Zoom: <input name="zoom" id="zoom" type="text" size="2"/>
Laengengrad: <input name="longitude" id="longitude" type="text" />

</div>
   </form>
<script type="text/javascript" language="JavaScript">
<!--
if (window.opener)

document.write('<input type="button" name="OK" value="OK" onclick="OK();">');
document.write('<input type="Button" name="Abbrechen" value="Abbrechen" onclick="self.close();">');

//-->
</script>

</center>
</body>
</html>

Rembrandt

  • Guest
Re: [MOD] Google-Maps Integration V.01
« Reply #224 on: December 06, 2013, 12:05:26 PM »
Was macht die Koordinatencheck?

 

Post your comments here