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

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

0 Members and 1 Guest are viewing this topic.

Offline Fryz

  • Jr. Member
  • **
  • Posts: 74
    • View Profile
    • Fryz' Media Galerie
Re: [MOD-beta] Google-Maps Integration V.01
« Reply #105 on: November 16, 2008, 03:52:55 PM »
Viele Dank für die schnelle Antwort, Bergblume  :D

Offline bergblume

  • Sr. Member
  • ****
  • Posts: 463
  • on to the top!
    • View Profile
Re: [MOD-beta] Google-Maps Integration V.01
« Reply #106 on: December 16, 2008, 05:32:51 PM »
  • mit den gespeicherten GPS-Daten lassen sich auch Verlinkungen zu Wetterdiensten herstellen

hallo mawenzi,

wie geht das? bzw. welche wetterdienste kann man hinzuziehen und wie erfolgt die implementierung? würde mich über eine aufklärung dies bzgl. sehr freuen.

bergblume

edit:
kann man diesen code hierfür irgendwie verwenden??? wenn ja, wie??

Code: [Select]

function google_weather($city)
{

// replace special characters in city name
// Ö->Oe, Ä->Ae, Ü->Ue
// ö->oe, ä->ae, ü->ue
$search = array(”/Ö/”, “/Ä/”, “/Ü/”, “/ö/”, “/ä/”, “/ü/”, “/ /”);
$replace = array(”Oe”, “Ae”, “Ue”, “oe”, “ae”, “ue”, “+”);
$city = trim(preg_replace($search, $replace, $city));

//
// Requesting the weather information from the google weather service.
// The google weather service is available under the following url.
// example http://www.google.com/ig/api?weather=Wien
$url = “http://www.google.com/ig/api?hl=de&weather=” . $city;
$file = file_get_contents($url);
$file = utf8_encode($file);
$wetter = simplexml_load_string($file);

// Requested google weather url
$Data["URL"] = $url;

// general information elements
$Data["stadt"] = utf8_encode($wetter->weather->forecast_information->city->attributes()->data);
$Data["postalcode"] = $wetter->weather->forecast_information->postal_code->attributes()->data;
$Data["datum"] = $wetter->weather->forecast_information->forecast_date->attributes()->data;
$Data["current_time"] = $wetter->weather->forecast_information->current_date_time->attributes()->data;

// Current weather conditions (condition and icon seems to be always empty)
$Data["jetzt_wetter"] = utf8_encode($wetter->weather->current_conditions->condition->attributes()->data);
$Data["jetzt_temp"] = $wetter->weather->current_conditions->temp_c->attributes()->data;
$Data["jetzt_feuchtigkeit"] = $wetter->weather->current_conditions->humidity->attributes()->data;
$Data["jetzt_wind"] = $wetter->weather->current_conditions->wind_condition->attributes()->data;
$Data["jetzt_icon"] = “weather->current_conditions->icon->attributes()->data.”\” />”;

// Today weather conditions
$Data["heute"] = $wetter->weather->forecast_conditions[0]->day_of_week->attributes()->data;
$Data["heute_min"] = $wetter->weather->forecast_conditions[0]->low->attributes()->data;
$Data["heute_max"] = $wetter->weather->forecast_conditions[0]->high->attributes()->data;
$Data["heute_wetter"] = utf8_encode($wetter->weather->forecast_conditions[0]->condition->attributes()->data);
$Data["heute_icon"] = “weather->forecast_conditions[0]->icon->attributes()->data.”\” />”;

// Day 2 weather conditions
$Data["zwei"] = $wetter->weather->forecast_conditions[1]->day_of_week->attributes()->data;
$Data["zwei_min"] = $wetter->weather->forecast_conditions[1]->low->attributes()->data;
$Data["zwei_max"] = $wetter->weather->forecast_conditions[1]->high->attributes()->data;
$Data["zwei_wetter"] = utf8_encode($wetter->weather->forecast_conditions[1]->condition->attributes()->data);
$Data["zwei_icon"] = “weather->forecast_conditions[1]->icon->attributes()->data.”\” />”;

// Day 3 weather conditions
$Data["drei"] = $wetter->weather->forecast_conditions[2]->day_of_week->attributes()->data;
$Data["drei_min"] = $wetter->weather->forecast_conditions[2]->low->attributes()->data;
$Data["drei_max"] = $wetter->weather->forecast_conditions[2]->high->attributes()->data;
$Data["drei_wetter"] = utf8_encode($wetter->weather->forecast_conditions[2]->condition->attributes()->data);
$Data["drei_icon"] = “weather->forecast_conditions[2]->icon->attributes()->data.”\” />”;

// Day 4 weather conditions
$Data["vier"] = $wetter->weather->forecast_conditions[3]->day_of_week->attributes()->data;
$Data["vier_min"] = $wetter->weather->forecast_conditions[3]->low->attributes()->data;
$Data["vier_max"] = $wetter->weather->forecast_conditions[3]->high->attributes()->data;
$Data["vier_wetter"] = utf8_encode($wetter->weather->forecast_conditions[3]->condition->attributes()->data);
$Data["vier_icon"] = “weather->forecast_conditions[3]->icon->attributes()->data.”\” />”;

return $Data;
}


Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [MOD-beta] Google-Maps Integration V.01
« Reply #107 on: December 16, 2008, 05:53:37 PM »
... über multimap.com war das mal möglich ...
... z.Z. wird man da aber nur auf eine Linkseite geführt, nicht mehr so toll ...
... der Link in der Detail-Seite ... wäre etwa so ...
Code: [Select]
<a href="http://uk2.multimap.com/M4/content.cgi?client=public&lat={image_map_lat}&lon={image_map_lon}&page=weather.htm&displayName={image_name}" target="_blank">Wetter vor Ort</a>
... man muss halt Web-Dienste finden, die ihre Infos über die lon- und lat-Werte ausgeben ...
... ein umfassende Anwendung ist z.B. über Wikipedia zu finden ... http://stable.toolserver.org/geohack/ ...
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 mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [MOD-beta] Google-Maps Integration V.01
« Reply #108 on: December 16, 2008, 06:04:05 PM »
... bei dem von dir angegebenen Codeschnipsel erfolgt die Wetterausgabe über den Stadtnamen ...
... wenn du etwas vergleichbares mit lon- und lat-Werten hättest, so könnte man hier etwas damit anfangen ...
... die Einbindung der lon- und lat-Werten statt des Stadtnamens funktioniert (wie sonst in Google-Maps) hier leider nicht ...
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 bergblume

  • Sr. Member
  • ****
  • Posts: 463
  • on to the top!
    • View Profile
Re: [MOD-beta] Google-Maps Integration V.01
« Reply #109 on: December 16, 2008, 06:09:35 PM »
hi mawenzi,

danke für deine schnelle antwort.. ja, das scheint das problem zu sein... das googlewetter funktioniert nur mit städtenamen... man könnte aber ja dann ein neues image-feld "stadt" erstellen, dass dann damit kombiniert wird, oder?

viele grüße
Ralf

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [MOD-beta] Google-Maps Integration V.01
« Reply #110 on: December 16, 2008, 06:28:59 PM »
... könnte man ...
... wäre aber für mich kein Ansatz ...
... allein die Koordinateneingabe zum Bild ist für viele User schon ein "Umstand" ...
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 luktur

  • Newbie
  • *
  • Posts: 38
    • View Profile
Re: [MOD-beta] Google-Maps Integration V.01
« Reply #111 on: December 27, 2008, 04:38:06 PM »
I have [MOD-beta] Google-Maps Integration V.01 - it's working very good.

Only admin can set the map. How create new tables that user can set the map?

This option I have in when I edit foto - only admis has it.


I want to have this option when I upload image.


Offline UssVoyager

  • Newbie
  • *
  • Posts: 32
    • View Profile
Re: [MOD-beta] Google-Maps Integration V.01
« Reply #112 on: February 07, 2009, 05:43:59 PM »
HI

So wie ich das jetzt sehe, gibt es kein  "Google-Map MOD" das über Stadtname uns Straßenname gespeist wird!?

Ist das richtig?

LG
UssVoyager

Rembrandt

  • Guest
Re: [MOD-beta] Google-Maps Integration V.01
« Reply #113 on: February 07, 2009, 05:56:08 PM »
Hi!
..So wie ich das jetzt sehe, gibt es kein  "Google-Map MOD" das über Stadtname uns Straßenname gespeist wird!?

Ist das richtig?...
woher soll den der stadtnamen den kommen?

mfg Andi

Offline UssVoyager

  • Newbie
  • *
  • Posts: 32
    • View Profile
Re: [MOD-beta] Google-Maps Integration V.01
« Reply #114 on: February 07, 2009, 06:15:00 PM »
http://www.die-bildersammlung.de/details.php?image_id=478

Woher sollen hier die GPS Daten her kommen?


LG
UssVoyager
« Last Edit: February 08, 2009, 08:49:14 AM by UssVoyager »

Rembrandt

  • Guest
Re: [MOD-beta] Google-Maps Integration V.01
« Reply #115 on: February 07, 2009, 06:32:51 PM »
...
Woher sollen hier die GPS Daten kommen?...
was wird das jetzt ?  :evil:

du wolltest wissen ob es möglich ist, google map mit stadt b.z.w. ortsnamen zu betreiben.

ich fragte dich darauf, woher soll der 'statdnamen' kommen, irgenwoher muss der ja her kommen?

gibt den irgendwer irgendwo ein, oder steht der 'ortsname' in dem exiffeld  'verschlusszeit' und wird von dort vielleicht ausgelesen?

mfg Andi

Offline UssVoyager

  • Newbie
  • *
  • Posts: 32
    • View Profile
Re: [MOD-beta] Google-Maps Integration V.01
« Reply #116 on: February 07, 2009, 06:54:04 PM »
 :D
@Andi

Den Ort habe ich doch immer, ich habe Ihn eher als die GPS Daten, lass uns mal die Kameras außen vor lassen, welche die Daten mit speichern, und schon im Bild verankern.

Die GPS Daten muss ich mir besorgen und ebenfalls irgendwo eintragen, also mir ist es egal wo ich den Ort eintrage.

Es soll ja auch keiner was für mich basteln, die Frage ist nur ob es das gibt.

Wenn ich auf einer Google Map  bin, reicht es  ja wenn ich Ort und Strasse eintrage, und diese beiden Dinge zu übernehmen wäre nur logisch, denn diese Info ist schnell eingetragen, egal wo.

Ich wollte nur nicht den GPS-Weg gehen wenn es den Stadt-Weg gibt  :wink:

Wenn es den Stadt-Weg nicht gibt, ist das halt so. 8O

Nachtrag:

So ich hab es jetzt auch, klappt prima, Danke für Eure Arbeit!! :!:

Wenn man das ganze mit Stadt und Straße übergeben kann, bin ich in jedem Fall interessiert, aber das hatte ich ja schon erwähnt!  :mrgreen:

LG
UssVoyager



 
« Last Edit: February 08, 2009, 08:48:27 AM by UssVoyager »

Offline darkcurves

  • Full Member
  • ***
  • Posts: 114
    • View Profile
    • KTM Railway Fan Club - Gallery
Re: [MOD-beta] Google-Maps Integration V.01
« Reply #117 on: March 10, 2009, 05:17:07 AM »
Hi, i just installed the mod. No error messages but Google Maps wont appear on the page. The whole area is just blank. Please check the screenshot. What could be the problem? Thanks.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD-beta] Google-Maps Integration V.01
« Reply #118 on: March 10, 2009, 05:21:15 AM »
Maybe you didn't replace ABCDEFGH....XYZ with your own key in step 4?
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline darkcurves

  • Full Member
  • ***
  • Posts: 114
    • View Profile
    • KTM Railway Fan Club - Gallery
Re: [MOD-beta] Google-Maps Integration V.01
« Reply #119 on: March 10, 2009, 05:43:39 AM »
I did, generated using Google Map API and replaced it. There should be a trailing slash right after the key?