google-maps-api-2

Google map comes partially, grey area comes instead of images from google server

大城市里の小女人 提交于 2019-11-27 03:31:27
Sometimes google map comes partially with other area getting grayed out. There is one catch, if we start Firebug, images do come in that gray area. Dont know why this is happening. Anybody ever experienced this and found solution, Please share. Hitman_99 This bug can occur if you are resizing the map's DIV . After resizing, try to call gmap.checkResize() function. Argiropoulos Stavros If you are using v3 try google.maps.event.trigger(map, "resize"); Also take a look at here Hi if you are using toggle in a div with a map container you call resizeMap in the function associated with the trigger:

Google Map API V2 - How do I keep a marker in the center of the screen while user is scrolling the map?

邮差的信 提交于 2019-11-27 03:18:12
问题 Google Map API V2 - How do I keep a marker in the center of the screen while user is scrolling the map ? My purpose is to let user choose a location. I use the following code to add a marker (it's from the com.example.mapdemo in Android SDK) mMap.addMarker(new MarkerOptions() .position(new LatLng(0, 0)) .title("Marker")); How do I keep the marker in the center of the screen and then retrieve it's location? 回答1: I do not think that you can actually keep a marker in the middle of the screen and

Add Marker function with Google Maps API

☆樱花仙子☆ 提交于 2019-11-27 01:34:31
I have the following Javascript that includes both the standard Google Maps API initialize() function and custom addMarker() function. The map will load fine however the marker does not get added to the map. <script type="text/javascript"> // Standard google maps function function initialize() { var myLatlng = new google.maps.LatLng(40.779502, -73.967857); var myOptions = { zoom: 12, center: myLatlng, mapTypeId: google.maps.MapTypeId.ROADMAP } map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); } // Function for adding a marker to the page. function addMarker(location)

Increase the api limit in ggmap's geocode function (in R)

不想你离开。 提交于 2019-11-27 01:02:38
问题 I'm trying to use the geocode function from the ggmaps library in R to get coordinates for specific locations. I'm able to use the function fine so far. The issue I'm running into is that I would like to increase my daily limit from 2,500 to 100,000 . The official Google documentation says that this is readily possible if you enable billing on the project, which I'm happy to do. When you proceed with this process, the Google Developers Console gives you a personalized API key. However, the

How to attach a flexible marker on map something like Uber and Lyft?

扶醉桌前 提交于 2019-11-26 23:22:41
问题 How to attach a flexible marker on map something like Uber and Lyft ? am using Google maps v2. Basically, i want to display a marker on map while the position of the marker is changed upon moving the map. edited: Ok i solved my problem. first : add an imageview to the same layout and position equal to center. second: to get the coordinate of the center of the map use the following approach 1- get viewgroup ( FrameLayout ) in my case where the map fragment is located. FrameLayout myContainer =

java.lang.NoClassDefFoundError: com.google.android.gms.common.internal.zzd

狂风中的少年 提交于 2019-11-26 21:53:31
问题 Using Maps api v2 and it works perfectly with 4.4 , 5.0, 5.1, 5.1.1 , 6 but app crashes when I try 4.2.2. I've been doing lots of research but nothing seems to work. Here's the complete log. FATAL EXCEPTION: main java.lang.NoClassDefFoundError: com.google.android.gms.common. at com.google.android.gms.measurement.internal.zzk$zza.get( at com.google.android.gms.measurement.internal.zzc.zzkG( at com.google.android.gms.measurement.internal.zzr.<init>( at com.google.android.gms.measurement

Set Google Maps Container DIV width and height 100%

◇◆丶佛笑我妖孽 提交于 2019-11-26 21:50:58
I loaded Google Maps API v3 and print Google Map in div . But when set width & height to 100% and auto I can't see the Map. Here is HTML code snippet. <!-- Maps Container --> <div id="map_canvas" style="height:100%;width:100px;margin:0 auto;"></div> Is there a way to fix this issue? You have to set all parent containers to a 100% width if you want to cover the whole page with it. You have to set an absolute value at width and height for the #content div at the very least. body, html { height: 100%; width: 100%; } div#content { width: 100%; height: 100%; } Setting Map Container to position to

Google Maps V2 shows blank screen on android 2.2

人走茶凉 提交于 2019-11-26 21:34:24
问题 I tried following a tutorial on Android Maps V2 Quick Start But when I run the app, a blank map screen is shown. My phone uses android 2.2.1. This is what shows in logcat: 12-07 18:07:52.479: W/dalvikvm(1654): VFY: unable to resolve instance field 24 12-07 18:07:53.129: W/dalvikvm(1654): Unable to resolve superclass of Lmaps/a/du; (411) 12-07 18:07:53.129: W/dalvikvm(1654): Link of class 'Lmaps/a/du;' failed 12-07 18:07:53.139: W/dalvikvm(1654): Unable to resolve superclass of Lmaps/a/ej;

While Make sign APK of Google map (Failed to load map Could not contact Google servers) this error accured

有些话、适合烂在心里 提交于 2019-11-26 21:09:42
问题 In my application I will implement Google Maps example However: When I directly run the application the map will run perfectly While I can make sign apk (make Key Store file and related to key Store Apk) then the map will not work For this problem I am tried so many ideas like Create an another and another API KEY of my app related to package Put extra permission in Android Manifest File (latest Manifest permission are given below) Can someone help? <RelativeLayout xmlns:android="http:/

Country specific zoom level in Google Maps API

此生再无相见时 提交于 2019-11-26 20:59:22
I'm trying to make a Google Map that only shows the Netherlands. But when I use zoom level 6 it shows Belgium and Germany as well and when I use zoom level 7 it zooms too far in that it doesn't show the complete country. How can I make The Netherlands show only, and not germany and belgium (or at least a very tiny part of them). Currently it looks something like this: go to http://www.gadm.org/download , download the adm0 file for the Netherlands Combine that polygon (as the inner ring(s)) with a polygon that covers the whole earth use the winding reversal tool to reverse any inner polygons