google-maps-api-3

Is it possible to customize fusion table( should point my database ) to use fusionTableLayer?

一个人想着一个人 提交于 2020-01-07 08:33:23
问题 I would like to create a Map by the excel sheet values (.csv files too). By using FusionTableLayer API, I think it is possible. At first step we could upload the excel values to the database. Then we create a map by the database annotated value. It is very good idea. This is what I wanted. But One thing is problem to me with FusionTableLayer API is google's Drive has been pointed for the fusion table. It means that all my business data will be shared with google. I don't want to be like that.

Showing nearest multiple markers on Google Map API JS V3 from current position of users at range of 30kms

余生长醉 提交于 2020-01-07 08:32:44
问题 I am creating an Mobile App where user(customer) will see multiple markers of drivers who is on the 30kms of range from the users current position. I am able to display multi markers, which are stored in the database by using JSON and JQuery. function multimarker(map) { jQuery.ajax({ url: baseurl + "getdriverlocation.php", type: "JSON", async: true, success: function(data){ var myArray = jQuery.parseJSON(data);// instead of JSON.parse(data) jQuery(myArray).each(function( index, element ) {

Infowindow works only for 1 route, it is not working for other 3 routes in google map

末鹿安然 提交于 2020-01-07 08:32:43
问题 I have total 5 locations in google map, i have set marker for that and added route path between markers, between this path i have added infowindow, but it is working for only 1 route, not working for other 3 route, can anyone please help me why it is not working for other 3 routes, also after closing that infowindow i am not able to open that infowindow, can we set somepoint between route, and on click open infowindow, can anyone please help me to resolve this issue ? var geocoder; var map;

Google Maps zoom gets overriden, when using a kml file 2

痞子三分冷 提交于 2020-01-07 08:25:16
问题 I can't achieve zoom on kml map, I am using same solution that is given here: google-maps-zoom-gets-over-riden-when-using-a-kml-file . You can see my jsfiddle here: jsfiddle for kml map zoom. If I remove preserveViewport: true from that example it will load the map with it I am not getting map. 回答1: The map needs to be initialized with a center. You are currently not doing that if you set preserveViewport to false; where do you expect the map to be centered? Your (problematic) code: var

Draggable pin not updating coordinates in Google Maps API

浪尽此生 提交于 2020-01-07 08:10:13
问题 I have this code that allows users to insert pins in Google Maps, by clicking on the map. Now I'm trying to make this pin draggable, so I just added draggable:true, in the initialization of the markers. But this is not updating the field with the coordinates. It only works if the user clicks in another place. What am I missing? // global "map" variable var map = null; var marker = null; // popup window for pin, if in use var infowindow = new google.maps.InfoWindow({ size: new google.maps.Size

javascript syntax to set object property value from external variable

三世轮回 提交于 2020-01-07 06:19:26
问题 I can better explain my case by code snippet var cascadiaFault = new google.maps.Polyline({ paths: [ new google.maps.LatLng(49.95, -128.1), new google.maps.LatLng(46.26, -126.3), new google.maps.LatLng(40.3, -125.4) ] }); the value of paths property should be assigned from external variable pathsTemp var pathsTemp = []; for (var i = 0; i < boxes.length; i++) { var bounds = boxes[i]; // Perform search over this bounds pathsTemp.push(bounds.getCenter()); } var cascadiaFault = new google.maps

Is it OK to use the maps.google.cn API outside of China?

北战南征 提交于 2020-01-07 05:25:08
问题 Google Maps is available in China per their documentation: The Google Maps APIs are served within China from the domain maps.google.cn. This domain does not support https. When making requests to the Google Maps APIs from China, please replace https://maps.googleapis.com with http://maps.google.cn. I have tested this outside China without any issues, however I can't find any documentation that prohibit developers from using http://maps.google.cn outside of china. Does anyone knows about any

Multiple Google maps on one page - Map API 3

我的未来我决定 提交于 2020-01-07 04:59:20
问题 I have a scenerio where I have to place multiple maps on one JSP page. And offcourse I have to handel their markers and polygons seprately. What strategy I am thinking is to make a hashmap of maps with a map id as their key. var mapInfo = {mapkey:'',map:''}; I will put map object in mapInfo.map and mapkey will be a string ID. But I am unable to place markers on the respective map. If I remove the logic of getting map object from hash. It works fine. I need a pointer on it. Getting a map

Display kml file on a map

时间秒杀一切 提交于 2020-01-07 04:43:21
问题 In my application I would like to display a kml file over the google maps using google map api v3. While I was searching for the solution I came across geoxml3, BUT i don't really understood its use and for what is used. Can anyone explain if its the solution to use geoxml3 to overlay kml file stored locally in my application. Or else what is the main use of geoxml3? 回答1: The Google Maps API v3 method for displaying KML (using tile based rendering) is KmlLayer Developer's Guide (including

Google Maps API V3: Exclude single marker from clustering

核能气质少年 提交于 2020-01-07 01:50:07
问题 I am using the google maps api and using grid clustering for the markers. I wanted to know if there is a way to exclude a single marker from clustering. I want a "You are here" marker that is always visible. I tried using a different array for just that marker and not including it the cluster function but that didn't work. Does anyone have a solution for this? Here is how i am doing the clustering $(document).on('click', '#mapbut', function() { var items, distances, you_are_here = [], markers