google-maps-api-3

Google Maps v3 - can I ensure smooth panning every time?

筅森魡賤 提交于 2019-12-20 09:53:52
问题 My map has several hundred markers within a city. Usually no more than a 20 mile radius. I've read through the documentation and haven't found a way to set the init to automatically pan between every marker, no matter the distance. The default behavior is to pan if close, jump if far. I understand why they would do this since the map doesn't load the whole world at the selected zoom level and it could screw up if the distance was too great. However, I think it could handle 20 mile radius with

Placing markers on Google Map With Django

只谈情不闲聊 提交于 2019-12-20 09:46:03
问题 I'm trying to place markers based on the latitude and longitude stored in a model on a Google Map using the API and HTML5 geolocation. The issue is how to loop through the lat/lon info for each object stored within JavaScript tags using template keywords, which I don't believe can be done in Django. I found a similar question here Adding Google Map Markers with DJango Template Tags in Javascript which I mildly modified and placed within a template – not a separate script file – but it doesn't

Return a JSON object using PHP json_encode() & MySQL to pass to jQuery function

五迷三道 提交于 2019-12-20 09:46:02
问题 I'm trying to create a json object from MySQL results, but not getting the result I need. Here is the PHP $json = array(); $result = mysqli_query ($connection, $query); echo '['; while($row = mysqli_fetch_array ($result)) { echo '{'; echo '"latitude":"'.$row['lat'].'",'; echo '"longitude":"'.$row['lng'].'",'; echo '"icon":'.'"./images/'.$row['busColor'].'.png"'; echo '}'; } echo ']'; $jsonstring = json_encode($json); echo $jsonstring; die(); It outputs this [{"latitude":"39.976257","longitude

Get Latitude and Longitude of all location that are within 10km radius of my current location through google map(using PHP)

会有一股神秘感。 提交于 2019-12-20 09:45:30
问题 i am new to Google map things. i have a table in which there are list of all the location( the location of super stores) with their Latitude and Longitude . Now i want to know all possible location(may b Latitude and Longitude ) of these super stores that are within 10km radius of my current location. I have no idea how i can do this using Google map (in php code). What Google map API should i used ? Any suggestion ,project code, information will be helpful for me Thanks in Advance 回答1: See

Google Maps API 3 search box

萝らか妹 提交于 2019-12-20 09:45:15
问题 I cannot figure out how to implement the search box in my google maps. I have it where the user can pick some stuff from a form and it loads the markers on the map. Now I want to add where they can type in the city and state using the google search box, like on maps.google.com. Can this be done with API v. 3? 回答1: There is no complete "widget" in Google maps for this task. But it is easy to accomplish it. In HTML you can have a text field and a button "Search". (Instead you can handle the

Google Maps v3 hide elements (roads, roadsigns, etc)

时光总嘲笑我的痴心妄想 提交于 2019-12-20 09:33:33
问题 I found a code snippet on http://www.41latitude.com/post/1268734799/google-styled-maps: [ { featureType: "administrative", elementType: "labels", stylers: [ { visibility: "off" } ] },{ featureType: "poi", elementType: "labels", stylers: [ { visibility: "off" } ] },{ featureType: "water", elementType: "labels", stylers: [ { visibility: "off" } ] },{ featureType: "road", elementType: "labels", stylers: [ { visibility: "off" } ] } ] I should be able to use it in my maps, but is there somebody

Google Maps v3 hide elements (roads, roadsigns, etc)

a 夏天 提交于 2019-12-20 09:31:05
问题 I found a code snippet on http://www.41latitude.com/post/1268734799/google-styled-maps: [ { featureType: "administrative", elementType: "labels", stylers: [ { visibility: "off" } ] },{ featureType: "poi", elementType: "labels", stylers: [ { visibility: "off" } ] },{ featureType: "water", elementType: "labels", stylers: [ { visibility: "off" } ] },{ featureType: "road", elementType: "labels", stylers: [ { visibility: "off" } ] } ] I should be able to use it in my maps, but is there somebody

Get heading and pitch from pixels on Street View

ε祈祈猫儿з 提交于 2019-12-20 09:19:27
问题 I think this is the best place for this question. I am trying to get the heading and pitch of any clicked point on an embedded Google Street View. The only pieces of information I know and can get are: The field of view (degrees) The center point's heading and pitch (in degrees) and x and y pixel position The x and y pixel position of the mouse click I've included here a screenshot with simplified measurements as an example: I initally just thought you could divide the field of view by the

Get google.maps.Map instance from a HTMLElement

纵然是瞬间 提交于 2019-12-20 09:15:06
问题 I have an existing map on a page. I can select that element using something along the lines of document.getElementById() to get the HTMLElement javascript object. Is it possible to get the instance of google.maps.Map created when the map is initialised, i.e. is it a property of the HTMLElement object or in its prototype? 回答1: You can't get google.maps.Map object from DOM Element ,on which Google Maps object have been constructed. google.maps.Map is just a wrapper, which controls DOM Element

Get google.maps.Map instance from a HTMLElement

爱⌒轻易说出口 提交于 2019-12-20 09:14:09
问题 I have an existing map on a page. I can select that element using something along the lines of document.getElementById() to get the HTMLElement javascript object. Is it possible to get the instance of google.maps.Map created when the map is initialised, i.e. is it a property of the HTMLElement object or in its prototype? 回答1: You can't get google.maps.Map object from DOM Element ,on which Google Maps object have been constructed. google.maps.Map is just a wrapper, which controls DOM Element