google-maps-api-2

SupportMapFragment appearing blank (Map Google V2)

心不动则不痛 提交于 2019-12-12 08:14:46
问题 I want to load a SupportMapFragment in a Fragment container. I get no errors, my API Key is fine, Google Play Services Library is imported and all permissions are called. I call the MapFragment this way: MapaFragment fragment = new MapaFragment(); FragmentTransaction ft2 = getFragmentManager().beginTransaction(); ft2.replace(android.R.id.tabcontent, fragment) .commit(); The Fragment is as follows: public class MapaFragment extends SupportMapFragment { private View v; @Override public View

Android GMaps v2 - Get location of the center of the map & map height and width

心不动则不痛 提交于 2019-12-12 05:22:24
问题 I'm trying to get the latitude and longitude of the center of the map in the Google Maps V2 API & get the width and length of the map. Here is my old code(from GMaps v1 that I started to modify): import com.google.android.gms.maps.GoogleMap; private GoogleMap mGoogleMapView; public LatLng getMapCenter() { if( mGoogleMapView != null ) { return mGoogleMapView.getMapCenter(); } /*if( mOpenStreetMapView != null ) { return convertOSMGeoPoint( mOpenStreetMapView.getMapCenter() ); }*/ return null; }

Marker maps not showing correct

回眸只為那壹抹淺笑 提交于 2019-12-12 02:54:37
问题 I have google maps in a orderform with different steps, this is done by hidden div's. First i'm getted grey area's on maps. That is solved by changing this code first: map = new GMap2(document.getElementById("map_canvas"); now: map = new GMap2(document.getElementById("map_canvas"),{ size: new GSize(430, 315) }); But now my map is not centered anymore. When i adding the marker, based on address, the marker is on right top of google maps. Does any one has an solution for this to? i know that i

SlidingMenu shows blsck when used with Map api v2

馋奶兔 提交于 2019-12-12 02:09:27
问题 I have developed an application. In it, I have used a fragment for showing Map . The layout only has a top title bar and a fragment . In the sliding menu layout I have title bar and some buttons . On click of a button in main layout I show the menu . The problem is that the menu is not showing up. Instead of menu there is only black color, But I am getting the title bar of menu . So i think the problem is the due to the map because the height of the black zone is same as that of the map I am

Google map v2 Black Screen with Sherlock and ListView

做~自己de王妃 提交于 2019-12-11 21:07:35
问题 Similar to the OP here (ViewPager with Google Maps API v2: mysterious black view), black dominates not just part but all of my Map when incorporated with the ListView. I do not believe the theme plays any part in creating this. When I attempted to incorporate that OP's answer, my entire fragment transformed into a black void. Would someone mind looking at my Fragment and help me figure out this error? Thanks! <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:map=

XML data can't be displayed from mysql using php

旧城冷巷雨未停 提交于 2019-12-11 19:58:57
问题 I'm following this tutorial when I found out, I can't view the expected output because I can't view my data in xml format. I have change the configuration data a little bit, didn't know if it was the cause of malfunction? <?php // Get parameters from URL $center_lat = $_GET["lat"]; $center_lng = $_GET["lng"]; $radius = $_GET["radius"]; // Start XML file, create parent node $dom = new DOMDocument("1.0"); $node = $dom->createElement("markers"); $parnode = $dom->appendChild($node); // Opens a

Deprecation of V2

放肆的年华 提交于 2019-12-11 19:39:11
问题 I have an application calling the v2 api without key using: <script type="text/javascript" src="http://maps.google.com/maps?file=api&v=2&key="></script> This has stopped working over the past couple of days. Console is showing only one error: Control is no longer supported in the Google Maps Javascript API v2... However, whichever way I try and call the v3 API, I get an error : "Google has disabled use of the Maps API for this application. The provided key is not a valid Google API Key, or it

Google Maps fetching transit information based on Stop ID

你说的曾经没有我的故事 提交于 2019-12-11 15:28:03
问题 I have got names and Stop IDs of several of TTC stops (Toronto). Based on the Stop ID, I want to get additional information on the stop. E.g. Based on the attached picture, if I input the Stop ID 2123, I want the information of mode of transport (Light Rail) and the route (505). I have tried a lot, but am not able to find the right API in Google Maps and Google Transit to fetch the data. Can someone please point me to the right direction? I can't do it manually through Google Maps web

Black view when rendering Google Maps on fragment

蓝咒 提交于 2019-12-11 15:06:56
问题 I'm using sliding menu for Android here is the link, when I slide on rendered map fragment, the sliding menu goes blank. Here is my map fragment code. public class BasicMapActivity extends SherlockFragment { private MapView mMapView; private GoogleMap mMap; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.basic_demo, null); // view.setBackgroundColor(0x00000000); mMapView = (MapView) view

How to obtain Browser key

岁酱吖の 提交于 2019-12-11 13:56:25
问题 I am using Google map API v2 in android and places API and for loading places. I need browser key and Google map API key. i generated Google map API key and used it map load successfully but when i did not understand how to generate browser key.please help me thanx 回答1: In https://code.google.com/apis/console -> API Access part in left panel -> And in new panel: And for get API Key for your application: How to get google map apikey in android 来源: https://stackoverflow.com/questions/18124726