如何获取当前位置而不是地图latlng

时间:2017-01-01 06:05:47

标签: dictionary location geo

如何在地图上添加当前位置默认值 告诉我只有latlng show here

$(document).ready(function(){

var mapCenter = new google.maps.LatLng(47.6145, -122.3418); //Google map Coordinates
var map;

map_initialize(); // initialize google map

//############### Google Map Initialize ##############
function map_initialize()
{
        var googleMapOptions = 
        { 
            center: mapCenter, // map center
            zoom: 17, //zoom level, 0 = earth view to higher value
            maxZoom: 18,
            minZoom: 16,
            zoomControlOptions: {
            style: google.maps.ZoomControlStyle.SMALL //zoom control size
        },
            scaleControl: true, // enable scale control
            mapTypeId: google.maps.MapTypeId.ROADMAP // google map type
        };

        map = new google.maps.Map(document.getElementById("google_map"), googleMapOptions); 

0 个答案:

没有答案