google-maps-api-3

Adding Array of Markers in Google Map

依然范特西╮ 提交于 2019-12-20 09:04:50
问题 I need some help in creating an array of markers in Google Map so that it can be more efficient, instead of create a marker one by one. I tried the following but it doesn't work. Anyone have advice? //create array to store a set of location var collection = new Array(); //a set of locations stored in array collection[0] = new google.maps.LatLng(13.742167701649997, 100.50721049308777); collection[1] = new google.maps.LatLng(13.74428, 100.5404525); collection[2] = new google.maps.LatLng(13

Google maps search box outside map

你。 提交于 2019-12-20 09:04:46
问题 I'm playing with the Google Maps API, and I've inserted a search-form with autocomplete. The problem is that the input-box is stuck into the map. I can't display it outside the map. <div style=" margin-top:100px;background: #00a6d6; width: 100%; height:100px;"><input id="address" style="position:absolute; left:1000px;" type="text" placeholder="Enter a location"></div> <div> <div id="map-canvas" style="height:500px; width:500px;"></div></div> http://jsfiddle.net/KyMCy/1/ Watch here. I want the

Make Zip code boundaries in Google Map API

怎甘沉沦 提交于 2019-12-20 08:45:18
问题 I have seen all the responses to a similar question, however, they are all either old, or no one has answered them. I have been given the task to obtain zip codes and display their corresponding boundaries to the user on a Google map, like in this example. I am writing this code in Javascript and using the Google Maps API. I want the user to input a zip code and a marker drops down on their destination with a border representing that zip code area. I see that Google Maps currently has

Google Maps Tile URL for HYBRID mapType tiles?

一曲冷凌霜 提交于 2019-12-20 08:04:07
问题 I have found a basic URL structure for regular map tiles: https://mts1.google.com/vt/lyrs=m@186112443&hl=x-local&src=app&x=1325&y=3143&z=13&s=Galile What would be the URL structure to grab HYBRID map tiles from Google? I don't know why I can't find this information; it seems like it should be easy to find. Am I missing something simple? . I have been messing with the lyrs parameter, and I think that may be part of it. When pasting the above URL in a browser, Ive tried lyrs=r , lyrs=h , lyrs=t

Google Javascript API Geocoding Limits

大城市里の小女人 提交于 2019-12-20 08:02:28
问题 What are the limits for client side geocoding with Google Maps JavaScript API v3? My research: Google Maps PHP API has a limit of 2500 geocode requests per day (https://developers.google.com/maps/documentation/geocoding/#Limits) Google Maps Javascript API v3 has a limit of 25000 map loads per day (https://developers.google.com/maps/documentation/javascript/usage) Google suggests using javascript API for geoocoding to avoid the 2500 limit through the PHP API. It states "running client-side

Google maps a.lat is not a function.

喜你入骨 提交于 2019-12-20 07:58:15
问题 This is my first time working with the javascript google maps api and I keep getting an this error when I try to LatLngBounds.extend() Uncaught TypeError: a.lat is not a function I have been able to get and average of all the coordinates and move the camera to that location but I want to be able to dynamically adjust the zoom to fit everything. I do not get the error when i comment out the line bounds.extend(myLatLng) in the for loop. map = new google.maps.Map(document.getElementById('map'),

Getting current location in google map and pass it to a variable in javascript

╄→尐↘猪︶ㄣ 提交于 2019-12-20 07:56:47
问题 I want to display a direction in google map from current location to a known location. my code is shown below: <script> var directionsDisplay; var directionsService = new google.maps.DirectionsService(); var map; function initialize() { directionsDisplay = new google.maps.DirectionsRenderer(); var bne = new google.maps.LatLng(-27.572832, 153.065247); var mapOptions = { zoom:7, center: bne } map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); directionsDisplay.setMap

Google geocode is late (still one step behind)

99封情书 提交于 2019-12-20 07:48:57
问题 I put there my whole code. Trying to determine location address. My script should create still one marker with geocoded address (in console - variable kktina). But, unfortunately, there isn't everything OK. Because by script still resolves previous location (or it takes previous coordinates, dunno). Maybe there is an error in code, but I'm not able to do this anymore.. So asking for help, thank you! <!DOCTYPE html> <html> <head> <title>Google Maps JavaScript API v3 Example: Map Simple</title>

Google Map Api Uncaught TypeError: Cannot read property '0' of null

妖精的绣舞 提交于 2019-12-20 07:47:51
问题 I am face the problem Uncaught TypeError: Cannot read property '0' of null on converting the address to latitude and longitude this the my code The code is function convertAddress( address, callback, item ) { geocoder.geocode( { 'address' : address }, function(results, status) { if ( status == google.maps.GeocoderStatus.OK ) { callback( results[0].geometry.location ); } cords = [ results[0].geometry.location.pb, results[0].geometry.location.qb ]; $.post( jobifySettings.ajaxurl, { action :

I am not able to place markers on the places which is already marked by google with other symbols .

◇◆丶佛笑我妖孽 提交于 2019-12-20 07:47:38
问题 The info window and marker is not shown for the places which is already marked by google. for example: if you run the code and click anywhere , a marker and a info window will appear as a result , but this doesn't happen for the places which are alreasy marked such as "The Brunswick","Open Air Theatre" etc. <!DOCTYPE html> <html> <head> <script src="http://maps.googleapis.com/maps/api/js"> </script> <script> var map; var myCenter=new google.maps.LatLng(51.508742,-0.120850); function