Keresés

Új hozzászólás Aktív témák

  • papa019

    senior tag

    válasz Sk8erPeter #2462 üzenetére

    function location_service(){
    if (navigator.geolocation) {
    navigator.geolocation.getCurrentPosition(success);
    } else {
    error('A böngésződ nem támogatja a helymeghatározást!');
    }
    }

    var helyzet;

    function success(position) {
    var image = new google.maps.MarkerImage('images/cross.png',
    // This marker is 20 pixels wide by 32 pixels tall.
    new google.maps.Size(40, 40),
    // The origin for this image is 0,0.
    new google.maps.Point(0,0),
    // The anchor for this image is the base of the flagpole at 0,32.
    new google.maps.Point(20, 20));

    helyzet = new google.maps.LatLng(position.coords.latitude, position.coords.longitude);

    var marker = new google.maps.Marker({
    position: helyzet,
    map: map,
    icon: image,
    animation: google.maps.Animation.DROP,
    title:"Itt vagy most!"
    });
    map.setCenter(helyzet);
    map.setZoom(12);
    }

Új hozzászólás Aktív témák

Hirdetés