android-mapview

How to add google-play-services.jar project dependency so my project will run and present map

痞子三分冷 提交于 2019-11-26 19:25:09
问题 I have following problem: I try to use SupportMapFragment from com.google.android.gms.maps.SupportMapFragment which is part of Google Maps Android API v2. My first approach was to add project to Eclipse from android-sdk\extras\google\google_play_services\libproject\google-play-services_lib location and set it as referenced project in Properties -> Project References menu of MyApp. I also added project to Java Build Path / Projects . Error indicators disappeared from Eclipse but when I tried

Combine image and text to drawable

自闭症网瘾萝莉.ら 提交于 2019-11-26 19:09:54
问题 I want to create a drawable, which consists of a map pin(bubble) and some text. The bubble should be in the background and the text in the foreground. This drawable should be passed in super(drawable) of the class BalloonItemizedOverlay which extends ItemizedOverlay<Item> . In other words, I want to show text in the bubble that appears in the map. I am using the Hello Mapview tutorial 回答1: This method takes a drawable from your resources, draws some text on top of it and returns the new

Google Maps Android API v2 very slow when adding lots of Markers

北城以北 提交于 2019-11-26 18:59:28
问题 I am updating an existing Android app to use the new Google Maps Android API v2. I have about 2500 markers that I want to add to the map. With the older version of the API I found the responsiveness of the maps to be horrendous when there are 2500 markers, so I had to work around it by only adding markers that are in the current visible region of the map. I was hoping 2500 markers would be faster with the new API, but it's still awful, even on a Nexus 4, and I'm not seeing any sort of option

How to handle onTouch event for map in Google Map API v2?

元气小坏坏 提交于 2019-11-26 18:55:01
GoogleMap by default doesn't provide event for map drag start and drag stop. I have already reported that problem here . I want to make custom handler that will use plain onTouch event and combine it with setOnCameraChangeListener . However i failed to find how I can access onTouch event of GoogleMap object. It doesn't provide such callback . I wonder how can i handle onTouch event for map in Google Map API v2 ? AZ13 Here is a possible workaround for determining drag start and drag end events: You have to extend SupportMapFragment or MapFragment . In onCreateView() you have to wrap your

android MapView always causes an OutOfMemoryError in nested elements

蓝咒 提交于 2019-11-26 18:24:41
问题 I am trying to create a MapView (currently without any overlays) inside some nested elements. It is basically something like ScrollView -> RelativeLayout -> RelativeLayout -> MapView <com.google.android.maps.MapView android:id="@+id/mapview" android:layout_width="420px" android:layout_height="300px" android:clickable="false" android:apiKey="key"/> Seems fine for me. There is nothing more that I do with it on startup but it always causes the following: 04-04 13:38:33.910: WARN/dalvikvm(13628):

Android Maps Point Clustering

瘦欲@ 提交于 2019-11-26 17:29:46
问题 Is there any code for Point Clustering in android? How can i load thousand pinpoint without having performance issues? 回答1: Last night i got into PointClustering on Android MapView. Saw that there was nothing out for the community so i would like to share. Groups the geopoints if the projection of them in the mapView is too close. Also renders only the visible poins. UPDATE Code reworked from scrach. Now available at GitHub Code Reworked from scratch Used GVM clustering algorithm (pretty fast

Android: automatically choose debug/release Maps api key?

二次信任 提交于 2019-11-26 17:12:29
OBSOLETED: this old question refers to obsoleted Google Maps v1 API. When using v2 API, you can use multiple certificate fingerprints in one Google API Console entry. API Key is no longer stored in Manifest nor code. Is it possible to automatically detect, which certificate was used for signing APK? I'd like to have both debug and release Maps certificates in application and pass valid one to MapView constructor. With such setup I will not make mistake while releasing application - I'm using debug certificate on emulator and my device, then sign with release one before sending app to Market. I

One Google Maps key for all developers?

风流意气都作罢 提交于 2019-11-26 16:36:28
We are using a Google MapView in our application but on different computers we must use different API keys, otherwise the MapView doesn't display anything. Is there a way to set one key for all developers? Is there a way to set one key for all developers? For the debug signing key, copy your debug keystore (e.g., ~/.android/debug.keystore ) between developer PCs, and remember to update all of them again when that keystore expires. For the production signing key, copy the production keystore between developer PCs. Note that I have not tried copying keystores between Windows and non-Windows (OS

Android - MapView contained within a Listview

北慕城南 提交于 2019-11-26 16:29:49
问题 Currently I am trying to place a MapView within a ListView. Has anyone had any success with this? Is it even possible? Here is my code: ListView myList = (ListView) findViewById(android.R.id.list); List<Map<String, Object>> groupData = new ArrayList<Map<String, Object>>(); Map<String, Object> curGroupMap = new HashMap<String, Object>(); groupData.add(curGroupMap); curGroupMap.put("ICON", R.drawable.back_icon); curGroupMap.put("NAME","Go Back"); curGroupMap.put("VALUE","By clicking here");

How to use multiple MapActivities/MapViews per Android application/process

点点圈 提交于 2019-11-26 16:21:19
I have written one MapActivity class that is able to display a set of places as well as single places. On startup, the application creates an instance of this MapActivity and displays multiple places. If the user clicks on a certain place, then a new Activity is launched that shows the details of the selected place. This activity has a menu item that allows the user to view the place on a map - this causes that a new instance of the MapActivity is created, except that now only this single place is displayed. The problem now is that if the user navigates back to the first MapActivity (the one