Search Results

Search found 271 results on 11 pages for 'mapview'.

Page 3/11 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11  | Next Page >

  • Android MapView with High Res tiles?

    - by Nemi
    I have created a simple map app that shows the local garage sales in my town. It was simple enough to create and I parse out the Google Maps (html) xml doc that the local paper uses on their google maps mashup on their website. I have noticed that the Map Tiles used in the MapView class are not as high-res as the tiles used in the real Android Google Maps app (I have a Droid). I have searched the docs and google, but I cannot find any info on this. Actually, I can't even find anyone mentioning this, which surprises me and makes me think I am missing something simple. Is this a case of Google making the APIs available, but at a lower quality, or am I missing some setting that enables higher quality map tiles?

    Read the article

  • Android MapView High Res tiles?

    - by Nemi
    I have created a simple map app that shows the local garage sales in my town. It was simple enough to create and I parse out the Google Maps (html) xml doc that the local paper uses on their google maps mashup on their website. I have noticed that the Map Tiles used in the MapView class are not as high-res as the tiles used in the real Android Google Maps app (I have a Droid). I have searched the docs and google, but I cannot find any info on this. Actually, I can't even find anyone mentioning this, which surprises me and makes me think I am missing something simple. Is this a case of Google making the APIs available, but at a lower quality, or am I missing some setting that enables higher quality map tiles?

    Read the article

  • Zoom controls not showing when using a MapView with fill_parent

    - by Joe
    Hey everyone I am working on an applications and I am using the built in zoom controls. When using a specific size I can see the zoom controls. When using fill_parent the zoom controls are not visible. How it is setup is a mapview inside of a frame layout(also using fill parent for the height and width but with an offset down the screen. The only thing I can think of is the fill parent issue is with the framelayout and the zoom controls are off the screen. Sorry if this is confusing, I confused myself writing it. Thanks in advance

    Read the article

  • Zooming out to fit all annotations in MapKit

    - by Krismutt
    Hey everybody!! I wanna zoom out so that all my annotations(my location and one more annotation) fit to the screen...what do I do wrong?? I get the following warning: "'getDistanceFrom:' is deprecated".... -(void)viewDidLoad { [super viewDidLoad]; mapView = [[MKMapView alloc] initWithFrame:self.view.bounds]; mapView.showsUserLocation = TRUE; mapView.delegate = self; mapView.mapType = MKMapTypeStandard; mapView.zoomEnabled = YES; mapView.scrollEnabled = YES; mapView.userInteractionEnabled = YES; [mapView.userLocation setTitle:@"Nuvarande plats"]; [mapView.userLocation setSubtitle:@"Du är här"]; [self.view insertSubview:mapView atIndex:0]; self.locationManager = [[[CLLocationManager alloc] init] autorelease]; locationManager.delegate = self; locationManager.desiredAccuracy = kCLLocationAccuracyBest; [locationManager startUpdatingLocation]; [mapView release]; } -(void) locationManager: (CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation{ NSLog (@"Position uppdateras" ); location = newLocation.coordinate; if (friZoom) { MKCoordinateRegion region; region.center.latitude = location.latitude; region.center.longitude= location.longitude; MKCoordinateSpan span; span.latitudeDelta = 0.01; span.longitudeDelta = 0.01; region.span = span; [mapView setRegion:region animated:TRUE];} } - (MKAnnotationView *)mapView:(MKMapView *)mapview viewForAnnotation:(id <MKAnnotation>)knappnal { if ([knappnal isKindOfClass:MKUserLocation.class]) { return nil; } MKPinAnnotationView *knappnalView = (MKPinAnnotationView*)[mapview dequeueReusableAnnotationViewWithIdentifier:@"annot"]; if (!knappnalView) { knappnalView = [[[MKPinAnnotationView alloc] initWithAnnotation:knappnal reuseIdentifier:@"annot"] autorelease]; knappnalView.pinColor = MKPinAnnotationColorRed; knappnalView.animatesDrop = YES; knappnalView.canShowCallout = YES; } else { knappnalView.annotation = knappnal; } return knappnalView; } - (IBAction)storeLocationInfo:(id) sender{ SparaPosition *position=[[SparaPosition alloc] initWithCoordinate:location]; [mapView addAnnotation:position]; savedPosition = location; } - (IBAction)visaPosition:(id)sender{ CLLocationCoordinate2D southWest =location; CLLocationCoordinate2D northEast =savedPosition; southWest.latitude = MIN(southWest.latitude, location.latitude); southWest.longitude = MIN(southWest.longitude, location.longitude); northEast.latitude = MAX(northEast.latitude, savedPosition.latitude); northEast.longitude = MAX(northEast.longitude, savedPosition.longitude); CLLocation *locSouthWest = [[CLLocation alloc] initWithLatitude:southWest.latitude longitude:southWest.longitude]; CLLocation *locNorthEast = [[CLLocation alloc] initWithLatitude:northEast.latitude longitude:northEast.longitude]; CLLocationDistance meters = [locSouthWest getDistanceFrom:locNorthEast]; MKCoordinateRegion region; region.center.latitude = (southWest.latitude + northEast.latitude) / 2.0; region.center.longitude = (southWest.longitude + northEast.longitude) / 2.0; region.span.latitudeDelta = meters / 111319.5; region.span.longitudeDelta = 0.0; region = [mapView regionThatFits:region]; [mapView setRegion:region animated:YES]; [locSouthWest release]; [locNorthEast release]; } Would really appreciate an answer!

    Read the article

  • overlay items from mysql

    - by user1285471
    I have several locations in tables in a mysql database which i want to have displayed as POI's, the table is too large and changes too frequently to use sql lite so i need to get the info from mysql. I have set up a mapView indicating the device location in mapview using an image at drawable, but i now need to ad the other locations from the database. Then when a user clicks on an item i need a popup with options to route there using google maps navigation, or view mobi site, phone, or email. I am new to android. Please assist. Have gone through the overlay tut but no indication on how to get the info from db. Is there a tut somwhere so i can see some example code to do this?

    Read the article

  • Android "application stopped unexpectedly" - google Hello MapView Tutoria

    - by Cookie
    Hi, I'm trying the Hello MapView Tutorial at the moment. Whe I launch the program in the emulator, I get a huge number of errors (none of the exceptions seems to be related with lines in my code). The emulator window tells the program "stopped unexpectedly". Can anybody tell me which is the key line in the error output? What do I have to change? 05-02 15:04:57.195: ERROR/vold(26): Error opening switch name path '/sys/class/switch/test2' (No such file or directory) 05-02 15:04:57.195: ERROR/vold(26): Error bootstrapping switch '/sys/class/switch/test2' (No such file or directory) 05-02 15:04:57.195: ERROR/vold(26): Error opening switch name path '/sys/class/switch/test' (No such file or directory) 05-02 15:04:57.195: ERROR/vold(26): Error bootstrapping switch '/sys/class/switch/test' (No such file or directory) 05-02 15:05:10.659: ERROR/MemoryHeapBase(51): error opening /dev/pmem: No such file or directory 05-02 15:05:10.659: ERROR/SurfaceFlinger(51): Couldn't open /sys/power/wait_for_fb_sleep or /sys/power/wait_for_fb_wake 05-02 15:05:10.699: ERROR/libEGL(51): couldn't load <libhgl.so> library (Cannot load library: load_library[984]: Library 'libhgl.so' not found) 05-02 15:05:11.403: ERROR/libEGL(62): couldn't load <libhgl.so> library (Cannot load library: load_library[984]: Library 'libhgl.so' not found) 05-02 15:05:14.775: ERROR/BatteryService(51): Could not open '/sys/class/power_supply/usb/online' 05-02 15:05:14.775: ERROR/BatteryService(51): Could not open '/sys/class/power_supply/battery/batt_vol' 05-02 15:05:14.775: ERROR/BatteryService(51): Could not open '/sys/class/power_supply/battery/batt_temp' 05-02 15:05:15.148: ERROR/EventHub(51): could not get driver version for /dev/input/mouse0, Not a typewriter 05-02 15:05:15.148: ERROR/EventHub(51): could not get driver version for /dev/input/mice, Not a typewriter 05-02 15:05:15.282: ERROR/System(51): Failure starting core service 05-02 15:05:15.282: ERROR/System(51): java.lang.SecurityException 05-02 15:05:15.282: ERROR/System(51): at android.os.BinderProxy.transact(Native Method) 05-02 15:05:15.282: ERROR/System(51): at android.os.ServiceManagerProxy.addService(ServiceManagerNative.java:146) 05-02 15:05:15.282: ERROR/System(51): at android.os.ServiceManager.addService(ServiceManager.java:72) 05-02 15:05:15.282: ERROR/System(51): at com.android.server.ServerThread.run(SystemServer.java:162) 05-02 15:05:15.302: ERROR/AndroidRuntime(51): Crash logging skipped, no checkin service 05-02 15:05:17.012: ERROR/LockPatternKeyguardView(51): Failed to bind to GLS while checking for account 05-02 15:05:21.795: ERROR/ActivityThread(100): Failed to find provider info for com.google.settings 05-02 15:05:21.819: ERROR/ActivityThread(100): Failed to find provider info for com.google.settings 05-02 15:05:25.872: ERROR/ApplicationContext(51): Couldn't create directory for SharedPreferences file shared_prefs/wallpaper-hints.xml 05-02 15:05:28.923: ERROR/vold(26): Cannot start volume '/sdcard' (volume is not bound) 05-02 15:05:26.879: ERROR/ActivityThread(97): Failed to find provider info for android.server.checkin 05-02 15:05:30.211: ERROR/ActivityThread(97): Failed to find provider info for android.server.checkin 05-02 15:05:30.430: ERROR/ActivityThread(97): Failed to find provider info for android.server.checkin 05-02 15:05:32.463: ERROR/MediaPlayerService(30): Couldn't open fd for content://settings/system/notification_sound 05-02 15:05:32.489: ERROR/MediaPlayer(51): Unable to to create media player 05-02 15:05:34.783: ERROR/ActivityThread(51): Failed to find provider info for com.google.settings 05-02 15:05:34.783: ERROR/ActivityThread(51): Failed to find provider info for com.google.settings 05-02 15:05:35.359: ERROR/AndroidRuntime(201): Uncaught handler: thread main exiting due to uncaught exception 05-02 15:05:35.395: ERROR/AndroidRuntime(201): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{org.diretto.client.smartphone.android/org.diretto.client.smartphone.android.ShowMap}: java.lang.ClassNotFoundException: org.diretto.client.smartphone.android.ShowMap in loader dalvik.system.PathClassLoader@4376af90 05-02 15:05:35.395: ERROR/AndroidRuntime(201): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2324) 05-02 15:05:35.395: ERROR/AndroidRuntime(201): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2417) 05-02 15:05:35.395: ERROR/AndroidRuntime(201): at android.app.ActivityThread.access$2100(ActivityThread.java:116) 05-02 15:05:35.395: ERROR/AndroidRuntime(201): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794) 05-02 15:05:35.395: ERROR/AndroidRuntime(201): at android.os.Handler.dispatchMessage(Handler.java:99) 05-02 15:05:35.395: ERROR/AndroidRuntime(201): at android.os.Looper.loop(Looper.java:123) 05-02 15:05:35.395: ERROR/AndroidRuntime(201): at android.app.ActivityThread.main(ActivityThread.java:4203) 05-02 15:05:35.395: ERROR/AndroidRuntime(201): at java.lang.reflect.Method.invokeNative(Native Method) 05-02 15:05:35.395: ERROR/AndroidRuntime(201): at java.lang.reflect.Method.invoke(Method.java:521) 05-02 15:05:35.395: ERROR/AndroidRuntime(201): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791) 05-02 15:05:35.395: ERROR/AndroidRuntime(201): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549) 05-02 15:05:35.395: ERROR/AndroidRuntime(201): at dalvik.system.NativeStart.main(Native Method) 05-02 15:05:35.395: ERROR/AndroidRuntime(201): Caused by: java.lang.ClassNotFoundException: org.diretto.client.smartphone.android.ShowMap in loader dalvik.system.PathClassLoader@4376af90 05-02 15:05:35.395: ERROR/AndroidRuntime(201): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243) 05-02 15:05:35.395: ERROR/AndroidRuntime(201): at java.lang.ClassLoader.loadClass(ClassLoader.java:573) 05-02 15:05:35.395: ERROR/AndroidRuntime(201): at java.lang.ClassLoader.loadClass(ClassLoader.java:532) 05-02 15:05:35.395: ERROR/AndroidRuntime(201): at android.app.Instrumentation.newActivity(Instrumentation.java:1097) 05-02 15:05:35.395: ERROR/AndroidRuntime(201): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2316) 05-02 15:05:35.395: ERROR/AndroidRuntime(201): ... 11 more 05-02 15:05:35.527: ERROR/dalvikvm(201): Unable to open stack trace file '/data/anr/traces.txt': Permission denied

    Read the article

  • draw is being constantly called in my android map overlay

    - by Itsik
    I'm trying to draw a route onto my MapView. I've extended Overlay and implemented the draw() method. The route is displayed properly, although while debugging, I added a breakpoint on draw(), and noticed it is being called constantly. I only want it to be re-drawn if someone moves the map or zooms (the draw take into account these changes when drawing the route) What can cause this ?

    Read the article

  • Connecting GPS coordinates taken from a database in Android using Overlay

    - by LordSnoutimus
    I am currently building an application that allows users to track where their phone has been on a Google Map. At the moment, when the onLocationChanged() method is called, the application stores the current GPS longitude and latitude in a database and calls the animateTo() method to the current position. Using SDK 1.5, how would I go about connecting these points with a coloured line drawn on the MapView using an Overlay?.

    Read the article

  • Overlay image/map on MapView?

    - by CCDEV
    Okay, hope you can help med here :) I have been searching everywhere to figure this out, but haven't had any luck. I know about Annotations and how to overlay them on a map on the iPhone. But what if I have location like in the forest where there arent any roads or anything. What I am asking is, how can I overlay a custom image (map) over the Map view so that it zooms the right way like the map, in the right scale, and can I add my own annotations on top of the custom image/map? Hop I was clear enough on what I am trying to do?

    Read the article

  • Fragments keep going back to the default position when MapView is Zoomed In/Out

    - by hectichavana
    I have an activity with 3 fragments displayed, a MapActivity, a ListActivity, and a (normal) DetailsActivity. The ListActivity and DetailsActivity is placed over the MapActivity. There's a function to hide both ListActivity and DetailsActivity with an Animation, and onAnimationEnd() I set a new layout for the hidden Activity. The problem I'm facing is, everytime one of the ListActivity or DetailsActivity hidden (picture State 2), and then I pinch the screen on the MapActivity to zoom the map, it always goes back to the default view (picture State 1). The closed Activities are automatically opened again. Does anybody know how to prevent the hidden fragments from going to the first state again when I pinch the MapActivity? this is an example of the function how I hide the DetailsActivity(): public void hideDetailview() { final Animation close = AnimationUtils.loadAnimation(this, R.anim.close); close.setFillEnabled(true); close.setAnimationListener(closeDetailAnimationListener); fragment_detail.startAnimation(close); Toast.makeText(MainFragmentActivity.this,WWHApplication.getDrawer(), Toast.LENGTH_SHORT).show(); } private AnimationListener closeDetailAnimationListener = new AnimationListener() { @Override public void onAnimationStart(Animation animation) { } @Override public void onAnimationRepeat(Animation animation) { } @Override public void onAnimationEnd(Animation animation) { int newLeft = -330; fragment_detail.layout(newLeft, fragment_detail.getTop(), newLeft + fragment_detail.getMeasuredWidth(), fragment_detail.getTop() + fragment_detail.getMeasuredHeight()); } };

    Read the article

  • UPDATE MKANNOTATION COORDINATES

    - by user345711
    Hi everyone, i'm having problems trying to update an annotation location with different coordinates. Is there any way I can change de location property without having to create another annotation? I've tried the code below with no luck. The annotation i'm trying to get is not updating its location. Please help! CLLocationCoordinate2D location; location.latitude = -36.560976; location.longitude = -59.455807; for (id annotation in self.mapView.annotations) { if ([annotation isKindOfClass:[MyAnnotation class]]) { [annotation setCoords:location]; //setCoords is defined in MyAnnotation class } } Thank you all!

    Read the article

  • How do I update an MKAnnotation location with new coordinates?

    - by user345711
    Hi everyone, i'm having problems trying to update an annotation location with different coordinates. Is there any way I can change de location property without having to create another annotation? I've tried the code below with no luck. The annotation i'm trying to get is not updating its location. Please help! CLLocationCoordinate2D location; location.latitude = -36.560976; location.longitude = -59.455807; for (id annotation in self.mapView.annotations) { if ([annotation isKindOfClass:[MyAnnotation class]]) { [annotation setCoords:location]; //setCoords is defined in MyAnnotation class } } Thank you all!

    Read the article

  • Android: automatically choose debug/release Maps api key?

    - by tomash
    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 was thinking about detecting my particular device or whether debugger is connected but it is not perfect. Maybe some file marking need for debug certificate? Is there any better way?

    Read the article

  • OnTouchEvent in a MapItemizedOverlay

    - by Danilo
    Hi, newbie here ... I have a MapView with a MapItemizedOverlay, like this : Drawable drawable = this.getResources().getDrawable(R.drawable.androidmarker); itemizedOverlay = new MapItemizedOverlay(drawable); OverlayItem overlayitem = new OverlayItem(p, "", ""); itemizedOverlay.addOverlay(overlayitem); mapOverlays.add(itemizedOverlay); I want to know when the user touches the AndroiMarker, so I can show some info about that specific place. How do I do that ? Tks in advance!

    Read the article

  • Determining where to animate the map given a list of GeoPoints

    - by Itsik
    My android application loads some markers on an overlay onto a MapView. The markers are placed based on a dynamic list of GeoPoints. I want to move the map center and zoom into the area with most items. Naively, I can calculate the superposition of all the points, but I would like to remove the points that are very far from the mass of points from the calculation. Is there a known way to calculate this ? (e.g. probability, statistics .. ?)

    Read the article

  • MyLocationOverlay dissappears, is not there onResume.

    - by Paul
    I have a mapView to which I add a MyLocationOverlay. It displays fine when the app starts from scratch (goes through onCreate). If I exit the app (back button) and then start it again (onResume), the overlay is gone. I have tried to fix this for 10+ hours. All sorts of messing with re-adding the overlay. Resetting the overlays. Changing the maps location so it's forced to redraw. Trying to manually invalidate or force a redraw of the overlay. NOTHING has worked. From the way the code looks, the Overlay object exists and everything is working fine - but it's just not on the map. Is anybody else having this problem? (Droid Incredible, 2.2)

    Read the article

  • How to add ListView to MapView from the xml resource ?

    - by user164589
    Hi guys. How to add ListView to MapView from the xml resource ? In order words, I am trying to make a screen contains google MapView and ListView. Because impossible to extends 2 Activitys' (ListActivity & MapActvity), I am trying to add a ListView(It is created from xml resource) to MapView. Thanks in advance.

    Read the article

  • How to use Multiple Map activity in Android?

    - by Praveen Chandrasekaran
    Hi folks, I am using 2 map Activities. do i want to register multiple Map APi key for each? Now I am getting this exception: 06-16 16:59:25.048: ERROR/MapActivity(10008): Couldn't get connection factory client I googled about this exception. It concludes that must be a API Key Problem? Is that true? Why it happens? Thanks

    Read the article

  • How to persist options selected in AlertDialog spawned from ItemizedOverlay onTap method

    - by ahsteele
    In the description of how to add a list of options to an AlertDialog the official Android documentation alludes to saving a users preferences with one of the "data storage techniques." The examples assume the AlertDialog has been spawned within an Activity class. In my case I've created a class that extends ItemizedOverlay. This class overrides the onTap method and uses an AlertDialog to prompt the user to make a multi-choice selection. I would like to capture and persist the selections for each OverlayItem they tap on. The below code is the onTap method I've written. It functions as written but doesn't yet do what I'd hope. I'd like to capture and persist each selection made by the user to be used later. How do I do that? Is using an AlertDialog in this manner a good idea? Are there better options? protected boolean onTap(int index) { OverlayItem item = _overlays.get(index); final CharSequence[] items = { "WiFi", "BlueTooth" }; final boolean[] checked = { false, false }; AlertDialog.Builder builder = new AlertDialog.Builder(_context); builder.setTitle(item.getTitle()); builder.setMultiChoiceItems(items, checked, new DialogInterface.OnMultiChoiceClickListener() { @Override public void onClick(DialogInterface dialog, int item, boolean isChecked) { // for now just show that the user touched an option Toast.makeText(_context, items[item], Toast.LENGTH_SHORT).show(); } }); builder.setPositiveButton("Okay", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int id) { // should I be examining what was checked here? dialog.dismiss(); } }); builder.setNegativeButton("Cancel", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int id) { dialog.cancel(); } }); AlertDialog alert = builder.create(); alert.show(); return true; }

    Read the article

  • route finding between two designation on maps in android?

    - by androidbase Praveen
    i want to just find a shortest path between the location on map. we have to pass the location's geopoint then click the button to get direction. it will show the shortest path like a blue line. how to do this? i search about this. many of them import a package com.google.googlenav.*;. where i have to get this? Any Idea???? Edit:got downloaded the Cloudemade API. how to draw the lines between the points.

    Read the article

  • Save options selected in AlertDialog spawned from ItemizedOverlay onTap method

    - by ahsteele
    In the description of how to add a list of options to an AlertDialog the official Android documentation alludes to saving a users preferences with one of the "data storage techniques." The examples assume the AlertDialog has been spawned within an Activity class. In my case I've created a class that extends ItemizedOverlay. This class overrides the onTap method and uses an AlertDialog to prompt the user to make a multi-choice selection. I would like to capture and persist the selections for each OverlayItem they tap on. That said I am unsure if utilizing an AlertDialog in this manner is the right approach and open to other suggestions. protected boolean onTap(int index) { OverlayItem item = _overlays.get(index); final CharSequence[] items = { "WiFi", "BlueTooth" }; final boolean[] checked = { false, false }; AlertDialog.Builder builder = new AlertDialog.Builder(_context); builder.setTitle(item.getTitle()); builder.setMultiChoiceItems(items, checked, new DialogInterface.OnMultiChoiceClickListener() { @Override public void onClick(DialogInterface dialog, int item, boolean isChecked) { // for now just show that the user touched an option Toast.makeText(_context, items[item], Toast.LENGTH_SHORT).show(); } }); builder.setPositiveButton("Okay", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int id) { // should I be examining what was checked here? dialog.dismiss(); } }); builder.setNegativeButton("Cancel", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int id) { dialog.cancel(); } }); AlertDialog alert = builder.create(); alert.show(); return true; }

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11  | Next Page >