SOBI 2 template with Google Maps - Strona 2
Strona 2 z 5 PierwszyPierwszy 1234 ... OstatniOstatni
Wyniki 11 do 20 z 47

Temat: SOBI 2 template with Google Maps

  1. #11
    Przeglądacz
    Dołączył
    08-08-2008
    Wpisy
    41
    Punkty
    10

    Domyślny

    Siema Michal,

    ja do dzis nie rozwiazalem obu problemow! Jak widzisz w odpowiedziach nikt nie napisal konkretnej pomocy

    Dlugos i szerokos geograficzna wpisuje recznie

    A Adres nadal wyswietla sie jak mu sie podoba

    WIEC TO JA BYL BYM ZOBOWIAZANY GDY OTRZYMASZ KONKRETNA POMOC ZA PRZEKAZANIE JA TUTAJ DALEJ !

    Pozdrawiam - Puri.
    Nasz-Berlin




  2. Pani Reklamowa
    Pani Reklamowa jest aktywna
    Avatar Panny Google

    Dołączył
    19-08-2010
    Skąd
    Internet
    Postów
    milion
    Pochwał
    setki
  3. #12
    Debiutant
    Dołączył
    30-10-2008
    Wpisy
    9
    Punkty
    10

    Domyślny

    Podpinam się pod temat..
    Może tu ktoś pomoże..

    mam joomle 1.0.15 i sobi 2
    i za cholere nie potrafie skonfigurować google maps..
    korzystałem z porad siugsiu.net ,
    i zrobiłem wszystko co jest tam napisane, lecz nadal mapy nie działają...
    wszystko czyli , przypisany API klucz google
    2 pola field_.. dla dlugosci i szerokosci
    ustaione na input..
    i dalej nie pojmuje.. prosze o pomoc.. neo_fox..

    pozdrawiam gm

  4. #13
    Przeglądacz
    Dołączył
    08-08-2008
    Wpisy
    41
    Punkty
    10
    Ja do dzis tego nie rozgryzlem !!!

    Wpisuje dlugosc i szerokosc do kazdego wpisu recznie...

    Pozdr - Puri. :confused:
    Nasz-Berlin




  5. #14
    Nowicjusz
    Dołączył
    29-01-2006
    Wpisy
    12
    Punkty
    10

    Domyślny

    Wyswietlanie mapy w opsie szczegolwym bez wpisywania recznie koordynatow.

    U mnie dziala wg :

    Step 1

    Goto - Configuration - Custom Fields Manager
    Create a Custom field called 'field_longitude' without the quotes
    Fileld Label = Longitude
    Field Type = Inputbox
    Click Save

    Step 2

    Create a Custom Field called 'field_latitude' without the quotes
    Fileld Label = Latitude
    Field Type = Inputbox
    Click Save

    Step 3

    Make sure all of the following fields exist...If not recreate them....I deleted Country when I first set this up...The fetch failed until I put it back....

    field for post code 'field_postcode' type = inputbox
    field for city 'field_city' type = inputbox
    field for street 'field_street' type = inputbox
    field for country 'field_country' type = inputbox

    Step 4
    Create a new field type "text code" (formerly called custom code)
    Cut and paste the script from this link into the code box

    skrypt:

    <script type="text/javascript" language="JavaScript">
    /* adjust here the field names if they are not correct */
    var apiKey = "{googleApiKey}";
    var postalCodeField = 'field_postcode';
    var cityField = 'field_city';
    var streetField = 'field_street';
    var countryField = 'field_country';
    var latitudeField = 'field_latitude';
    var longitudeField = 'field_longitude';

    function fetchCoordinates() {
    /* here you should not change anything */
    var gRequest = null;
    var postalcode = document.getElementById(postalCodeField).value;
    var city = document.getElementById(cityField).value;
    var street = document.getElementById(streetField).value;
    var country = document.getElementById(countryField).value;

    if(postalcode == '' || city == '' || street == '' || country == '' ) {
    /* you can change the error message here */
    alert("Proszę wypełnić pola adresowe");
    }
    else {
    var gRequest = "http://maps.google.com/maps/geo?q=" +street+ "+" +postalcode+ "+" +city+ "+" +country+ "&callback=getCoordinates&output=JSON&key="+apiKey ;
    var scriptObj = document.createElement("script");
    scriptObj.setAttribute("type", "text/javascript");
    scriptObj.setAttribute("src", gRequest);
    document.getElementsByTagName("head").item(0).appe ndChild(scriptObj);
    }
    }
    function getCoordinates(data) {
    switch(data.Status.code) {
    case 610:
    /* you can change the error message here */
    alert("Api key nieprawidłowy: {googleApiKey}");
    break;
    case 603:
    case 602:
    case 601:
    case 500:
    /* you can change the error message here */
    alert("Nie można pobrać koordynatów geograficznych dla tego adresu");
    break;
    case 200:
    document.getElementById(latitudeField).value = data.Placemark[0].Point.coordinates[1];
    document.getElementById(longitudeField).value = data.Placemark[0].Point.coordinates[0];
    break;
    }
    }
    ***********
    <!-- You can change the "value" (The label on the button) here -->
    <input type="button" class="button" onclick="fetchCoordinates();" value="Pobierz automatycznie koordynaty geograficzne do GoogleMaps"/>


    Step 5
    Goto "View Configuration" - "Google Maps"

    Step 6

    Enter your google maps API

    Step 7

    Check the box to show google maps.
    Set "Map Latitude Field" to field_latitude
    Set "Map Longitude Field" to field_longitude

    Step 8 - Testing

    Pozostaje konfiguracja (nazwy pol, ukrys szer dl w opisie szczegolwym etc)

  6. #15
    Przeglądacz
    Dołączył
    08-08-2008
    Wpisy
    41
    Punkty
    10

    Brak BUTTON

    Witam,

    zrobilem jak napisales ale jeszcze gdzies w tym diabel siedzi, bo JUZ pokazuje w formularzu "Dodaj wpis" nazwe " Pobierz koordynaty..." ale NIE MA FUNKCJI BUTTON :confused: tylko martwy tekst...

    zobacz tutaj

    Dziekuje i pozdrawiam.
    Nasz-Berlin




  7. #16
    Nowicjusz
    Dołączył
    29-01-2006
    Wpisy
    12
    Punkty
    10

    Domyślny

    www.techpolis.pl > baza firm (www w trakcie budowy). Mozesz zobaczyc jak to wyglada, jesli zrobilem wg w/w krokow. posprawdzaj wszystko jeszcze raz ... jak nie pojdzie to pomyslimy .... jak wroce z pracy

    btw: zalogowalem sie u ciebie ... no i rzeczywiscie wcielo przyciski. (może skrypt nie przekopiowales caly?)

  8. #17
    Przeglądacz
    Dołączył
    08-08-2008
    Wpisy
    41
    Punkty
    10
    Hej Lagren,

    raczej zrobilem wszystko 100% wedlug instrukcji i chyba juz z 5 razy sprawdzilem wszystko... Tak u mnie to wyglada w BACKEND SCREENSHOT

    A code jest ten (kopia 1:1):

    <script type="text/javascript" language="JavaScript">
    /* adjust here the field names if they are not correct */
    var apiKey = "{googleApiKey}";
    var postalCodeField = 'field_postcode';
    var cityField = 'field_city';
    var streetField = 'field_street';
    var countryField = 'field_country';
    var latitudeField = 'field_latitude';
    var longitudeField = 'field_longitude';

    function fetchCoordinates() {
    /* here you should not change anything */
    var gRequest = null;
    var postalcode = document.getElementById(postalCodeField).value;
    var city = document.getElementById(cityField).value;
    var street = document.getElementById(streetField).value;
    var country = document.getElementById(countryField).value;

    if(postalcode == '' || city == '' || street == '' || country == '' ) {
    /* you can change the error message here */
    alert("Proszę wypełnić pola adresowe");
    }
    else {
    var gRequest = "http://maps.google.com/maps/geo?q=" +street+ "+" +postalcode+ "+" +city+ "+" +country+ "&callback=getCoordinates&output=JSON&key="+ap iKey ;
    var scriptObj = document.createElement("script");
    scriptObj.setAttribute("type", "text/javascript");
    scriptObj.setAttribute("src", gRequest);
    document.getElementsByTagName("head").item(0).appe ndChild(scriptObj);
    }
    }
    function getCoordinates(data) {
    switch(data.Status.code) {
    case 610:
    /* you can change the error message here */
    alert("Api key nieprawidłowy: {googleApiKey}");
    break;
    case 603:
    case 602:
    case 601:
    case 500:
    /* you can change the error message here */
    alert("Nie można pobrać koordynatów geograficznych dla tego adresu");
    break;
    case 200:
    document.getElementById(latitudeField).value = data.Placemark[0].Point.coordinates[1];
    document.getElementById(longitudeField).value = data.Placemark[0].Point.coordinates[0];
    break;
    }
    }
    ***********
    <!-- You can change the "value" (The label on the button) here -->
    <input type="button" class="button" onclick="fetchCoordinates();" value="Pobierz automatycznie koordynaty geograficzne do GoogleMaps"/>


    ...wiec juz naprawde sam nie wiem :confused:

    DZiekuje za poswiecony czas i pozdrawiam z Berlina - Puri.
    Nasz-Berlin




  9. #18
    Nowicjusz
    Dołączył
    29-01-2006
    Wpisy
    12
    Punkty
    10

    Domyślny

    Widze tylko roznice w polach dlugosci i szerokosci. Masz wlaczone pole administracyjne na TAK, ja mam na NIE. Nie sadze, zeby to bylo to.
    Reszte mam tak samo.
    joomla 1.5.9, sobi2 RC 2.9.1.0.

  10. #19
    Debiutant
    Dołączył
    30-10-2008
    Wpisy
    9
    Punkty
    10

    Domyślny

    niestety.. mi też się nie udało..
    zrobiłem wszystko co było opisane w poście lagren'a..
    jedyne czego nie wiem... to jak nazwac pole z text code
    moze dlatego cos nie dziala..

    Pozdrawiam i dziękuje za wskazówki

  11. #20
    Debiutant
    Dołączył
    07-01-2009
    Wpisy
    3
    Punkty
    10

    Domyślny

    Cytat Wysłane przez lagren Zobacz wiadomość
    Wyswietlanie mapy w opsie szczegolwym bez wpisywania recznie koordynatow.

    U mnie dziala wg :

    Step 1

    Goto - Configuration - Custom Fields Manager
    Create a Custom field called 'field_longitude' without the quotes
    Fileld Label = Longitude
    Field Type = Inputbox
    Click Save

    Step 2

    Create a Custom Field called 'field_latitude' without the quotes
    Fileld Label = Latitude
    Field Type = Inputbox
    Click Save

    Step 3

    Make sure all of the following fields exist...If not recreate them....I deleted Country when I first set this up...The fetch failed until I put it back....

    field for post code 'field_postcode' type = inputbox
    field for city 'field_city' type = inputbox
    field for street 'field_street' type = inputbox
    field for country 'field_country' type = inputbox

    Step 4
    Create a new field type "text code" (formerly called custom code)
    Cut and paste the script from this link into the code box

    skrypt:

    <script type="text/javascript" language="JavaScript">
    /* adjust here the field names if they are not correct */
    var apiKey = "{googleApiKey}";
    var postalCodeField = 'field_postcode';
    var cityField = 'field_city';
    var streetField = 'field_street';
    var countryField = 'field_country';
    var latitudeField = 'field_latitude';
    var longitudeField = 'field_longitude';

    function fetchCoordinates() {
    /* here you should not change anything */
    var gRequest = null;
    var postalcode = document.getElementById(postalCodeField).value;
    var city = document.getElementById(cityField).value;
    var street = document.getElementById(streetField).value;
    var country = document.getElementById(countryField).value;

    if(postalcode == '' || city == '' || street == '' || country == '' ) {
    /* you can change the error message here */
    alert("Proszę wypełnić pola adresowe");
    }
    else {
    var gRequest = "http://maps.google.com/maps/geo?q=" +street+ "+" +postalcode+ "+" +city+ "+" +country+ "&callback=getCoordinates&output=JSON&key="+apiKey ;
    var scriptObj = document.createElement("script");
    scriptObj.setAttribute("type", "text/javascript");
    scriptObj.setAttribute("src", gRequest);
    document.getElementsByTagName("head").item(0).appe ndChild(scriptObj);
    }
    }
    function getCoordinates(data) {
    switch(data.Status.code) {
    case 610:
    /* you can change the error message here */
    alert("Api key nieprawidłowy: {googleApiKey}");
    break;
    case 603:
    case 602:
    case 601:
    case 500:
    /* you can change the error message here */
    alert("Nie można pobrać koordynatów geograficznych dla tego adresu");
    break;
    case 200:
    document.getElementById(latitudeField).value = data.Placemark[0].Point.coordinates[1];
    document.getElementById(longitudeField).value = data.Placemark[0].Point.coordinates[0];
    break;
    }
    }
    ***********
    <!-- You can change the "value" (The label on the button) here -->
    <input type="button" class="button" onclick="fetchCoordinates();" value="Pobierz automatycznie koordynaty geograficzne do GoogleMaps"/>


    Step 5
    Goto "View Configuration" - "Google Maps"

    Step 6

    Enter your google maps API

    Step 7

    Check the box to show google maps.
    Set "Map Latitude Field" to field_latitude
    Set "Map Longitude Field" to field_longitude

    Step 8 - Testing

    Pozostaje konfiguracja (nazwy pol, ukrys szer dl w opisie szczegolwym etc)
    Znalazłem chyba rozwiązanie problemu:
    Pierwsza rzecz to: *********** , zamiast nich powinno być < / s c r i p t > bez spacji, bo przy pisaniu posta forum zamienia na gwiazdki

    Drugi błąd to linijka: document.getElementsByTagName("head").item(0).appe ndChild(scriptObj);

    przy kopiowaniu powstaje spacja między appe nChild(scriptObj);

    a musi być razem: appenChild(scriptObj);

    po zmianie tych 2 rzeczy zaczęło działać, chociaż znalazłem małą ułomność tego rozwiązania.

Strona 2 z 5 PierwszyPierwszy 1234 ... OstatniOstatni

Reguły pisania

  • Nie możesz zakładać nowych tematów
  • Nie możesz dodawać wypowiedzi
  • Nie możesz dodawać załączników
  • Nie możesz poprawiać swoich postów
  •