google-maps-api-3

Google weather library

本小妞迷上赌 提交于 2019-12-22 13:56:00
问题 I'm using Google library time showing it on the map. The problem I have is that the first window that displays is very small and you have to scroll. How do I control the size of this window? Second, I would like to only show the map for the coordinates that I give, and show me the least time around I want. How do I do that? This is my code in here: function generartiempo(36.745,-3.87665,'mapatiempo') { var mapOptions = { zoom: 11, center: new google.maps.LatLng(lat,lng,true), mapTypeId:

Positioning markers over the top of clusters; z-index not working

邮差的信 提交于 2019-12-22 12:59:06
问题 I've got some JSON data populating markers and then clustering using MarkerClusterer. I also have some alert type markers that don't cluster on purpose. Could someone please help me out with how to get the alert markers to display over the top of the cluster markers? I've tried setting a z-index on the marker and using .getZIndex() returns the z-index I set however no matter how high I set it it's always positioned under the cluster marker. Is there some sort of magic I'm missing? The

Google Maps API v3 api key

让人想犯罪 __ 提交于 2019-12-22 12:25:43
问题 i am writing a cordova app, where i am using Google Maps API V3. Since this is going to run locally in a web view for each user, i assume that i need to create an api key for google maps api. I created a new browser key last night, and i put in the referrers all possible urls: * 127.0.0.1/* localhost localhost:7000 but everytime i use it, i get an error saying: Google has disabled use of the Maps API for this application. I don't want to use the workaround to simply remove the key, any clues?

Google Map looks moved inside the div

和自甴很熟 提交于 2019-12-22 12:25:42
问题 I'm having problems with google maps. I load the maps JS in a file where I append a modal div using ajax (and jquery), which contains the map. Something like the following image is what I got: However, when I "close" the modal (which removes the div and, thus, the map) and try to open it again, a problem occurs: Apart from looking incomplete, it looks like maps thinks its top left corner is some pixels out of the div. I assure you this, because when I try to move the map it refreshes its

Google map api v3 add polylines from array

拥有回忆 提交于 2019-12-22 11:29:32
问题 I'm trying to add a set of poly lines to a google map from an array. Here is my code: <!DOCTYPE html> <html> <head> <meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> <style type="text/css"> html { height: 90% } body { height: 90%; margin: 0; padding: 0 } #map_canvas { height: 100% } </style> <script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"> </script> <script type="text/javascript"> var poly; var map; function initialize() { var

Mark current location on google map

旧街凉风 提交于 2019-12-22 11:28:46
问题 How to mark my current location on google map? I am using google place API. I have to show all near places from my current position. All places are showing on google map, but how to show my current position? The code is given below: public class PoliceStationMapActivity extends FragmentActivity implements LocationListener { private ArrayList<Place> mArrayListPoliceStations; private GoogleMap mMap; private LocationManager locManager; private double latitude; private double longitude; @Override

Google Places Auto-complete in extjs4

江枫思渺然 提交于 2019-12-22 11:13:33
问题 I am using extjs4 and Spring at server side. I need to integrate Google Places Auto-complete inside one of the extjs4 form. Is there any way this can be done. I am not sure weather we can integrate Google Auto-complete with extjs I have searched but not find anything more specific to my requirement. Please guide me ..... look at my code ... Ext.define('abce.view.ReportMissing', { extend : 'Ext.panel.Panel', alias : 'widget.report_missing', bodyPadding : 10, autoScroll : true, frame : true,

Unload Google Maps API?

喜欢而已 提交于 2019-12-22 11:09:03
问题 I have a main page that uses ajax to load subpages and one of these subpages contains a google map, and so it loads the google maps api using the <script> tag: <script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&sensor=SET_TO_TRUE_OR_FALSE"> I noticed that this loads a bunch of css and js files into both my main page and subpage. When I click on a different link in my main page, I want to be able to unload all of these files and remove any js objects

google maps v3: center of bounds is different from center of the map

…衆ロ難τιáo~ 提交于 2019-12-22 10:56:57
问题 How is it possible that map.getCenter() might be different from map.getBounds().getCenter() ? > cragMap.getCenter() > Q {d: 13.823563748466814, e: 0, toString: function, b: function, equals: function…} > cragMap.getBounds().getCenter() > Q {d: 5.9865924355766005, e: 0, toString: function, b: function, equals: function…} This happens in my case and prevents me from coding one particular feature. Any idea what is the cause of this? 回答1: It is caused by latitude non-linearity of mercartor

Google Maps - Autocomplete & Directions API - trigger onchange() for dropdown list?

守給你的承諾、 提交于 2019-12-22 10:44:49
问题 I have Google Map and two inputs. Both of them use autocomplete, like this: //first input autocomplete var input1 = (document.getElementById('start')); var autocomplete1 = new google.maps.places.Autocomplete(input1); autocomplete1.bindTo('bounds', map); //second input autocomplete var input2 = (document.getElementById('end')); var autocomplete2 = new google.maps.places.Autocomplete(input2); autocomplete2.bindTo('bounds', map); After I fill both of these inputs I'm displaying the shortest way