Coder Social home page Coder Social logo

osmdroid's Introduction

StandWithUkraine: Stand With Ukraine

osmdroid Build Status Maven Central Android Arsenal SourceSpy Dashboard

osmdroid is a (almost) full/free replacement for Android's MapView (v1 API) class. It also includes a modular tile provider system with support for numerous online and offline tile sources and overlay support with built-in overlays for plotting icons, tracking location, and drawing shapes.

Get it on F-Droid Get it on F-Droid

Current Release: 6.1.18 Jan 1, 2024

Current Development version: 6.1.19-SNAPSHOT

Next Release Version (planned): 6.1.19

Note: check your calendar, it may take up to a few days for all global mirrors to update.

Please read the osmdroid wiki for tutorials on integration.

Gradle dependency

repositories {
        mavenCentral()
}

dependencies {
    implementation 'org.osmdroid:osmdroid-android:<VERSION>'
}

Be sure to replace <VERSION> with the last release version above.

Maven dependency

<dependency>
  <groupId>org.osmdroid</groupId>
  <artifactId>osmdroid-android</artifactId>
  <version><VERSION></version>
  <type>aar</type>
</dependency>

Platform or API Level (API level 8 = Platform 2.2)

Note: this just assumes you need just osmdroid-android. Other modules require higher min SDK levels.

<platform>8</platform>

You can also compile osmdroid from source or download the dependency directly from OSS or download the distribution package

Want the latest and greatest?

We periodically publish snapshots to maven central. If you're interesting in trying it out, using the following:

repositories {
    mavenCentral()
    maven{
        url  'https://oss.sonatype.org/content/repositories/snapshots/'
        name 'OSS-Sonatype'
    }
}
dependencies {
    implementation 'org.osmdroid:osmdroid-android:<VERSION>-SNAPSHOT:debug@aar'
}

Use at your own risk though, it may not be stable or may have bugs or performance issues. If you run across any, please report them.

In case gradle doesn't resolve it, it can be download manually here: https://oss.sonatype.org/service/local/repositories/snapshots/content/org/osmdroid/osmdroid-android/-SNAPSHOT/osmdroid-android--SNAPSHOT.aar

Side note: gradle's cached dependencies and doesn't really handle snapshot very well. To force gradle to update snapshots on every build, try adding this to your root build.gradle file.

allprojects  {
  // forces all changing dependencies (i.e. SNAPSHOTs) to automagicially download
    configurations.all {
        resolutionStrategy {
            cacheChangingModulesFor 0, 'seconds'
    }
}

You can also build your project using the gradle option --refreshDependencies

OK now what?

Continue reading here, How-to-use-the-osmdroid-library

Related and important wiki articles

I have a question or want to report a bug

If you have a question, please view the osmdroid FAQ.
You can also view the Stack Overflow osmdroid tag and osmdroid Google Group where you can get feedback from a large pool of osmdroid users.

If you still have an issue, please check the Changelog page to see if this issue is fixed in a newer or upcoming version of osmdroid.

If think you have a legitimate bug to report then go to the Issues page to see if your issue has been reported. If your issue already exists then please contribute information that will help us track down the source of the issue. If your issue does not exist then create a new issue report. When creating an issue, please include the version of osmdroid, the Android platform target and test device you are using, and a detailed description of the problem with relevant code. It is particularly helpful if you can reproduce the problem using our OpenStreetMapViewer sample project as your starting point.

I want to contribute

See our contributing guide

For your reference, the dashboard provides a high level overview of the repository including structure of UI classes, module dependencies, external libraries, and other components of the system.

I want more!

The OSMBonusPack project adds additional functionality for use with osmdroid projects.

Screenshots

Demo Videos

Free Draw

Maps Forge

Floating point zoom

IIS Tracker

Building from source for editing osmdroid

JDK11+ is required Gradle 7.4.2 is what we are currently using Android Studio Bumblebee (latest supported configuration as of May 2022)

./gradlew clean build

Then you can install and test the app using normal command line utils.

Or just open Android studio.

Building from source and using the aar's in your app

JDK11+ is required Gradle 7.4.2 is what we are currently using (latest supported configuration as of May 2022)

We recommend building from the command line.

./gradlew clean build publishToMavenLocal

In your root build.gradle file, add mavenLocal() if not present.

allprojects {
    repositories {
            mavenCentral()
            mavenLocal()    //add this if it's missing
    }
}

Then in your APK or AAR project that needs osmdroid.

    implementation 'org.osmdroid:osmdroid-android:<VERSION>-SNAPSHOT:debug@aar'

Where VERSION is the version listed as the value for pom.version in osmdroid's gradle.properties. Note that when using the release versions from Maven Central, drop the :debug@aar part. When using a "release" version that you build locally with gradle, you'll need :debug@aar instead.

Support

osmdroid is entirely community supported. There is no corporate sponsorship. No full time employees, no paid employees. It's all volunteer support, if that. If you see a problem, feel free to report, fix it and open a pull request. You have access to 100% of the source code. Maps are hard to get right and this library isn't perfect.

Please don't complain about slow response times or lack of support. You will be banned. No warnings, no second chances.

We do NOT provide map data, map tiles, imagery, etc. That is all provided by a map tile source that you select or that you provide. Please don't complain about a map source showing you the wrong data. It's not the fault of this library.

osmdroid's People

Contributors

b3nn0 avatar cbalster avatar chrisail avatar hannesa2 avatar jklimke avatar johnjohndoe avatar jpstotz avatar k3b avatar kurtzmarc avatar linquize avatar maradox avatar matthiasdittmer avatar miguel-porto avatar mkergall avatar monsieurtanuki avatar neilboyd avatar oliverlockwood avatar pasniak avatar pwrxpsycho avatar sandykurniawan19 avatar secaw avatar shiroyagi avatar shorti1996 avatar spyhunter99 avatar sun-jiao avatar tester2012 avatar wharnisch avatar xyz32 avatar ziem avatar zkjellberg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

osmdroid's Issues

mapsforge

Can you include a tileprovider for mapsforge files?

MapView out of memory

Hello, I created a MapView object in an activity. But I found out a terrible issue. After I have rotated the tablet many times, the MapView object always throws Out Of Memory exception. As the result, the activity is blocked or reflect slowly....

message "not a DRM file" spammed on API 17

Test system:
Samsung Galaxy Tab 2 7.0 compiled with API 17 (Android 4.2.2)

It looks like this in LogCat:
07-11 16:12:22.828: I/System.out(10661): Not a DRM File, opening notmally
07-11 16:12:22.828: I/System.out(10661): Not a DRM File, opening notmally
07-11 16:12:22.835: I/System.out(10661): Not a DRM File, opening notmally
07-11 16:12:22.835: I/System.out(10661): Not a DRM File, opening notmally
07-11 16:12:22.835: I/System.out(10661): buffer returned
07-11 16:12:22.835: I/System.out(10661): buffer returned
07-11 16:12:22.835: I/System.out(10661): buffer returned
07-11 16:12:22.835: I/System.out(10661): buffer returned
07-11 16:12:22.843: I/System.out(10661): Not a DRM File, opening notmally
07-11 16:12:22.843: I/System.out(10661): Not a DRM File, opening notmally
07-11 16:12:22.843: I/System.out(10661): buffer returned
07-11 16:12:22.843: I/System.out(10661): buffer returned
07-11 16:12:22.843: I/System.out(10661): Not a DRM File, opening notmally
07-11 16:12:22.843: I/System.out(10661): buffer returned
07-11 16:12:22.859: I/System.out(10661): Not a DRM File, opening notmally
07-11 16:12:22.867: I/System.out(10661): buffer returned
07-11 16:12:22.867: I/System.out(10661): Not a DRM File, opening notmally

This happens every few milliseconds as soon as my mapView is visible. I think this may hurt performance a lot (and it also clutters the log like hell).

Permission issue ruled out I think.

Discussion at Google Groups:
https://groups.google.com/forum/?hl=de#!topic/osmdroid/eXbN3MzyYUo

Tiles corrupted

Samsung Tab3 7in, TM-210, Androis 4.1.2

As soon as I zoom or pan, corrupted tiles appear on the screen (sometimes a negative version of the tile, sometimes a kind of random noise). After a few seconds the application freezes, then closes down.

Thanks for any hint.
JPB

Format of tiles in MAPQUESTOSM tile source

In osmdroid, in TileSourceFactory.java, MAPQUESTOSM XYTileSource is defined as using ".png" extension for tiles.

But MapQuest documentation constantly specifies its tiles extension as ".jpg".
(http://developer.mapquest.com/web/products/open/map)

For online usage, this difference doesn't matter: MapQuest also supports tiles requests with a .png extension. It still returns JPEG files, which are properly handled (even with the wrong .png extension) by the Android framework.

However, there is at least one case where this difference has an impact: when using MOBAC to create an offline package of tiles, with "OpenStreetMap MapQuest" as the source.
MOBAC outputs MapQuest tiles with ".jpg" extension (in "Osmdroid ZIP", "Osmdroid SQLite" and "MBTiles SQLite" formats). This completely blocks MAPQUESTOSM tile provider to load tiles from a MOBAC package
(see http://stackoverflow.com/questions/22862534/download-maps-for-osmdroid/22868462#22868462 for details about this issue)

This is quite significant when working with offline maps, as MapQuest is now the only OSM source still available in MOBAC.

Conclusion: it would be better to change the tile extension of MAPQUESTOSM (and of MAPQUESTAERIAL) to ".jpg".

runOnFirstFix() should be coordinated to setLocation() in Handler

When the first onLocationChanged() is called we fire off a Runnable in the main thread handler to call setLocation(). We also fire off new threads for each mRunOnFirstFix. However it is possible for the Runnable in mRunOnFirstFix to be called before setLocation() is called. Also we don't check for location == null before calling all the mRunOnFirstFix.

We should fire off the mRunOnFirstFix Runnables in the handler Runnable.

Cant create external tile source

Can someone tell me how to create a new tile source without using internal resources?
The XYTileSource constructor requires a ResourceProxy.string which are all pre-defined. I can create my own tile source and add it with TileSourceFactory.addTileSource(tileSource);
but then I need to use one of the internal to osmdroid resource strings. I need to use my own resource string which is relevant for the new tile source. If this is not possible then the XYTileSource class needs a new constructor with a different signature.

incomplete map is shown

looks like it is very old issue, at least since early 3.X and still is not fixed

What steps will reproduce the problem?

use openstreetmap in online mode, the tiles will be cached.
change to offline mode. on start, screen is completely filled with tiles,
however, swipe any direction and some tiles are not loaded, swipe more
and just empty grid is.
the tiles are for sure in the cache, if zoom out and zoom in
everything is shown in normal way.

after swipe it looks similar to image in issue "some tiles not refresh after zoom #52", but
starting from center everything is empty in opposite direction of the swipe.

What version of the product are you using? On what operating system?

android/ osmdroid 4.2

Consider using the Projection to handle "safe" drawing

Since the size of our virtual canvas can be extremely large at high zoom levels we were experiencing drawing anomalies due to roundoff errors since the skia library uses floats internally for coordinates. To combat that we wrote a Canvas wrapper that would "shift" all canvas calls to a coordinate system where 0,0 is the upper-left corner of the screen. This effectively worked.

However it's becoming a bit unwieldy to manage. One different approach would be to do the "shifting" in the Projection class. This means we would have to use the Projection for all lat/long<->pixel coordinate conversions, but we really should be doing that anyway. We could also add to/fromMercator() methods to actually convert from TileSystem methods as a supplement.

Please provide feedback.

MapController.setCenter offset

When we call the new MapController.setCenter implemented at revision 423680b,
the map center is not at the GeoPoint we pass, but at an offset of half the screen down right.
Can you confirm that?

Tiles not loading without SD card image

I am working on porting my app to the fragments support. For this purpose I created new emulator image with Android 4.0.3 and Nexus 7 device profile. But map tiles won't load in new emulator.

After some playing with settings and some googling, found solution - just need to create sd card image. But Nexus 7 doesn't have sd card for real. There is no such problem with real Nexus 7.

CompassOverlay invalidateCompass

Hi,

Compass overlay invalidation does not seem to work after the latest projection changes.
The calculated rectangle at invalidateCompass has values out of sync with compass position.

Emux
Cruiser

MapTileFilesystemProvider always reloads tiles

If you leave files on your SD for a week or more
FilesystemProvider will start realoading all tiles constantly, and it is constantly eating CPU and memory.

Found out following code:

 final long now = System.currentTimeMillis();
                final long lastModified = file.lastModified();
                final boolean fileExpired = lastModified < now - mMaximumCachedFileAge;

                if (fileExpired && drawable != null) {
                    if (DEBUGMODE) {
                        logger.debug("Tile expired: " + tile);
                    }
                    drawable.setState(new int[] {ExpirableBitmapDrawable.EXPIRED });
                }

                return drawable;

It seems that mMaximumCachedFileAge is fixed to ONE_WEEK and cannot be modified.
Tried subclassing MapTileFilesystemProvider and replacing it in MapTileProviderBasic subclass, but map simply shows default implementation.
My tileset functions are executed and tiles are loaded from filesystem, but aren't displayed.

Any solution?

Support up to 1E7 instead of 1E6

We had to bump the precision up to 7 decimal places in an older version of osmdroid (I believe 3.0.4, my coworker did not leave great notes) and increase the zoom levels to 22-23 for sub meter accuracy. I'd like to get this work into the latest version of osmdroid if at all possible. Would something like this be useful?

some tiles not refresh after zoom

the version of osmdroid is 4.3. I run the project on the Samsung t520, which the version of android is 4.4.2
mapView.getController().setZoom(5), then I wait for seconds, some tiles is not show, then i move the map, all tiles show.
someone meet this problems?

2014072201

Tiles corrupted

Samsung Tab3 7in, TM-210, Android 4.1.2

As soon as I zoom or pan, corrupted tiles are loaded, sometimes a negative version of the tile sometimes a random noise. After a few seconds, the app freezes and then closes down.

Thanks for a clue.
JP

GoogleWrapperSample: IllegalStateException when selecting "Google Map v1" a second time

Use the following steps to reproduce the crash:

  1. Start the GoogleWrapperSample application. "OpenStreetMap" is loaded by default.
  2. Select "Google Map v1" from the action menu.
  3. Select "OpenStreetMap" from the action menu.
  4. Select "Google Map v1" from the action menu.
java.lang.IllegalStateException: 
        You are only allowed to have a single MapView in a MapActivity
    at com.google.android.maps.MapActivity.setupMapView(MapActivity.java:397)
    at com.google.android.maps.MapView.<init>(MapView.java:289)
    at com.google.android.maps.MapView.<init>(MapView.java:235)
    at org.osmdroid.google.sample.GoogleWrapperSample
        .setMapView(GoogleWrapperSample.java:181)
    at org.osmdroid.google.sample.GoogleWrapperSample
        .onOptionsItemSelected(GoogleWrapperSample.java:143)
    at android.app.Activity.onMenuItemSelected(Activity.java:2502)
    ...

Build instructions for Android Studio

I can't figure out how to build osmdroid using Android Studio due to the maven repos not being found. Can someone write up instructions on how to build osmdroid using Android Studio?

License question

I'm working on a small library based on the OSMMapTilePackager code that will allow tiles to be packaged directly on an Android device. I want to make sure I'm appropriately following the OS license, but it seems that the code in the OSMMapTilePackager packages doesn't adhere to the license itself (no license info in the source files).

My source files differ significantly from those in OSMMapTilePackager, but I'd like to give attribution in accordance with the Apache 2 license. Can anyone give me some guidance on this?

Migrate ScaleBarOverlay to Path drawing so that it can be HW accelerated

Currently the ScaleBarOverlay uses a Picture object to draw the scalebar. This is not HW acceleration compatible, and therefore requires additional work to draw. It is also the last overlay in the MapFragment in OpenStreetMapViewer to not be HW accelerated and therefore slows down the buttery smooth performance we want.

We can migrate the Picture to a Path and then turn on HW acceleration for that Overlay.

GoogleWrapperSample. osm-android-4.2. MapFactory.getMap throws exception.

osm-android-4.0 works fine. But GoogleWrapperSample throws exception with osm-android-4.2 and osm-android-third-party-4.2:
E/AndroidRuntime๏น• FATAL EXCEPTION: main
java.lang.NoSuchMethodError: com.google.android.gms.maps.MapsInitializer.initialize
at org.osmdroid.google.wrapper.v2.MapFactory.getMap(MapFactory.java:23)
at com.tatinfotech.myapplication.GoogleWrapperSample.setMapView(GoogleWrapperSample.java:192)
at com.tatinfotech.myapplication.GoogleWrapperSample.onOptionsItemSelected(GoogleWrapperSample.java:150)
at android.app.Activity.onMenuItemSelected(Activity.java:2516)
at com.android.internal.policy.impl.PhoneWindow.onMenuItemSelected(PhoneWindow.java:961)
at com.android.internal.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:735)
at com.android.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:149)
at com.android.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:874)
at com.android.internal.view.menu.ListMenuPresenter.onItemClick(ListMenuPresenter.java:163)

zoomToBoundingBox sometimes doesn't work as expected

Hi!
I'm displaying OverlayItems and PathOverlay on map. zoomToBoundingBox methor doesn't work as expected. Sometimes parts of PathOverlay and OverlayItems are off-screen. As javadoc suggests I'm waiting until getScreenRect(null).getHeight() > 0 and then I'm calling zoomToBoundingBox.

I'm attaching screenshots from my app:
http://imgur.com/Vw3kFO2,qVzn2wm,NiFltpb (on third image MapView is centered ok)

Let me know if you need any more information.

Potential race condition in MyLocationNewOverlay

Consider the following:

  1. We start the location overlay with LocationProvider1
  2. LocationProvider1 starts a background thread to read positions from a sensor.
  3. It reads a location and posts the result back to the location overlay.
  4. The location overlay calls mMapView.post() to push the call to setLocation() on the main thread.
  5. Before that Runnable runs, we set a new location provider LocationProvider2. The location overlay checks the last known location from the provider and calls setLocation() with it.
  6. The Runnable runs and posts the location from the old LocationProvider1 overwriting the newer, fresher value from the new LocationProvider2.

The fix is simple - the overlay should create its own Handler on the main thread and then clear it when a new provider is set.

Add ability to add additional tile providers

It would be great to be able to add custom MapTileModuleProviderBase derived class to the map view. But it appears there's no way to manipulate the tile provider list in a MapTileProviderArray once constructed, or to influence what goes into it on construction.

Minimap Overlay Tile Size

When I create a custom minimap tile provider with tilesize different than the one of the map and apply it to the minimap, Instead of loading the minimap's tiles with the size imposed by the tileprovider it uses the one of the TileSystem which is essentially the one of the mapview. I am using OSMDroid 4.1.

Support for Google Maps v.2

Hello,

OSM has a really nice job using a similar syntax to Google Maps v1, so exportation is really easy. Is it planned to do the same and support Google Maps v2?

Regards

Don't use child views for measuring MapView size

I ran into a strange problem - I was adding a geo-located child view that was way "off-screen" and this was resulting in my MapView reporting an enormous size. By examining the code it appeared that in onMeasure we take into account the position of the children views and let that affect the MapView size. So if a child view is 10,000 pixels to the right the screen we let that increase the MapView size by 10,000.

Maybe I am misunderstanding the code in onMeasure (which was contributed code), but I found that all we need to do is:

   @Override
    protected void onMeasure(final int widthMeasureSpec, final int heightMeasureSpec)
    {
        // Get the children to measure themselves so we know their size in onLayout()
        measureChildren(widthMeasureSpec, heightMeasureSpec);

        super.onMeasure(widthMeasureSpec, heightMeasureSpec);
    }

Please comment if someone can explain.

GEMF files not shown

What has been done :
Create an atlas with MOBAC 1.9.16, using "Osmdroid GEMF" format and "OpenStreetMap MapQuest" as source, and selecting (at least) zoom level 0.
File "Layer.gemf" transfered on the device in the existing /sdcard/osmdroid path.

Then, in a basic app based on osmdroid 4.1 (app which works fine with the default Mapnik Tile Source), change to this tile source:

map.setTileSource(new XYTileSource("MapQuest",
ResourceProxy.string.mapquest_osm, 0, 18, 256, ".jpg", new String[] {
"http://otile1.mqcdn.com/tiles/1.0.0/map/",
"http://otile2.mqcdn.com/tiles/1.0.0/map/",
"http://otile3.mqcdn.com/tiles/1.0.0/map/",
"http://otile4.mqcdn.com/tiles/1.0.0/map/" }));
map.setUseDataConnection(false);
mapController.setZoom(0);

Result: only the "grey grid" is shown.

More info (tracing with the debugger):

The file is properly detected and loaded as an archive file (in GEMFFile#openFiles).
At display, proper range (x=0,y=0,z=0) is detected (in GEMFFile#getInputStream, line "range = rs;" is reached)

The big issue occurs in BitmapTileSourceBase#getDrawable, at line:
final Bitmap bitmap = BitmapFactory.decodeStream(aFileInputStream, null, bitmapOptions);
=> this call never exit!

Tiles not showing on Android 2.2

I have the following on my Samsung I5500 with Android 2.2
2014-04-11 15 48 17
Open map application from Google Play
(sorry for the foto, I was unable to take a screenshot)

As you can see, the map is empty. It has checkered background.
I have osmdroid sources attached to my project, so I put breakpoint to see what is wrong. I seems that tiles are not drawn for some reason. TileDownloader works correctly, it successfully downloads tiles and stores it. So, the problem is in drawing.
Interesting, that I have another phone with Android 2.2.2 and It works great.
Any suggestions?

Deprecate PathOverlay

The PathOverlay is very old and doesn't work correctly. It is causing confusion amongst users that try to use it (see this question). We could try to fix it, but that task has been proposed before and no one has picked it up (issue 392). I believe there is better Path support in OSMBonusPack (Polygon.java) and we should defer people to that.

Agreed?

OsmPath example

I'm trying to use OsmPath and something isn't right. When scrolling it "floats" away.

Xamarin C#:

public override void Draw(Canvas c, MapView osmv, bool shadow)
        {
            if (shadow)
                return;

            IProjection projection = osmv.Projection;

            if (_boundaryPath == null)
            {
                _boundaryPath = new OsmPath();
                this.UpdatePath(_boundaryPath, projection, _boundary);
            }

            _boundaryPath.OnDrawCycle((Projection)projection);

            c.DrawPath(_minefieldBoundaryPath, _outlinePaint);
}

And UpdatePath:

        private void UpdatePath(Path path, IProjection projection, IGeometry geometry)
        {
            path.Reset();
            path.SetFillType(Path.FillType.EvenOdd);

            if (geometry == null)
                return;

            GeoPoint recycleGeoPoint = new GeoPoint(0,0);
            Point recyclePoint = new Point();

            for (int n = 0; n < geometry.NumGeometries; n++)
            {
                IPolygon poly = (IPolygon)geometry.GetGeometryN(n);

                // Draw the shell
                Coordinate[] coords = poly.Shell.Coordinates;
                for (int i = 0; i < coords.Length; i++)
                {
                    Coordinate coord = coords[i];
                    recycleGeoPoint.SetCoordsE6((int)(coord.Y * 1e6), (int)(coord.X * 1e6));

                    projection.ToPixels(recycleGeoPoint, recyclePoint);
                    if (i == 0)
                        path.MoveTo(recyclePoint.X, recyclePoint.Y);
                    else
                        path.LineTo(recyclePoint.X, recyclePoint.Y);
                }

                // And any holes
                foreach (ILinearRing hole in poly.Holes)
                {
                    coords = hole.Coordinates;
                    for (int i = 0; i < coords.Length; i++)
                    {
                        Coordinate coord = coords[i];
                        recycleGeoPoint.SetCoordsE6((int)(coord.Y * 1e6), (int)(coord.X * 1e6));
                        projection.ToPixels(recycleGeoPoint, recyclePoint);
                        if (i == 0)
                            path.MoveTo(recyclePoint.X, recyclePoint.Y);
                        else
                            path.LineTo(recyclePoint.X, recyclePoint.Y);
                    }
                }
            }
        }

Upgrade Google Play Services to version 15

Moved from Google Code issue 530.

With the latest Google Play Services, in osmdroid-third-party module at MapFactory class line 25, the MapsInitializer.initialize no longer throws GooglePlayServicesNotAvailableException and at its description now says:

"Initializes the Google Maps Android API so that its classes are ready for use. If you are using MapFragment or MapView and have already obtained a (non-null) GoogleMap by calling getMap() on either of these classes, then it is not necessary to call this."

My location overlay smooth paint

Hi,

I suggest at my location overlays to use for paint objects a smooth paint i.e.

new Paint(Paint.FILTER_BITMAP_FLAG)

like it is used at CompassOverlay.
That way the direction arrow would have smooth edges while rotating.

I know that we can subclass MyLocationNewOverlay and call

mPaint.setFilterBitmap(true)

but it would be better to fix it at library.

Emux
Cruiser

Tiles Problem after recoverying from back stack

Hi!

I am having a problem with the map when i recover the fragment from the backstack, i start getting:

08-02 23:27:35.264: W/o_.o_.t_.m_.MapTileMod_(1168): RejectedExecutionException
08-02 23:27:35.264: W/o_.o_.t_.m_.MapTileMod_(1168): java.util.concurrent.RejectedExecutionException: Task org.osmdroid.tileprovider.modules.MapTileFilesystemProvider$TileLoader@413da8f8 rejected from java.util.concurrent.ThreadPoolExecutor@418d8d28[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 56]
08-02 23:27:35.264: W/o_.o_.t_.m_.MapTileMod_(1168): at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:1967)
08-02 23:27:35.264: W/o_.o_.t_.m_.MapTileMod_(1168): at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:782)
08-02 23:27:35.264: W/o_.o_.t_.m_.MapTileMod_(1168): at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1303)
08-02 23:27:35.264: W/o_.o_.t_.m_.MapTileMod_(1168): at org.osmdroid.tileprovider.modules.MapTileModuleProviderBase.loadMapTileAsync(MapTileModuleProviderBase.java:147)
08-02 23:27:35.264: W/o_.o_.t_.m_.MapTileMod_(1168): at org.osmdroid.tileprovider.MapTileProviderArray.getMapTile(MapTileProviderArray.java:119)
08-02 23:27:35.264: W/o_.o_.t_.m_.MapTileMod_(1168): at org.osmdroid.views.overlay.TilesOverlay$1.handleTile(TilesOverlay.java:170)
08-02 23:27:35.264: W/o_.o_.t_.m_.MapTileMod_(1168): at org.osmdroid.util.TileLooper.loop(TileLooper.java:34)
08-02 23:27:35.264: W/o_.o_.t_.m_.MapTileMod_(1168): at org.osmdroid.views.overlay.TilesOverlay.drawTiles(TilesOverlay.java:149)
08-02 23:27:35.264: W/o_.o_.t_.m_.MapTileMod_(1168): at org.osmdroid.views.overlay.TilesOverlay.draw(TilesOverlay.java:136)
08-02 23:27:35.264: W/o_.o_.t_.m_.MapTileMod_(1168): at org.osmdroid.views.overlay.OverlayManager.onDraw(OverlayManager.java:109)
08-02 23:27:35.264: W/o_.o_.t_.m_.MapTileMod_(1168): at org.osmdroid.views.MapView.dispatchDraw(MapView.java:924)
08-02 23:27:35.264: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.View.getDisplayList(View.java:12407)
08-02 23:27:35.264: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.View.getDisplayList(View.java:12453)
08-02 23:27:35.264: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.View.draw(View.java:13182)
08-02 23:27:35.264: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.ViewGroup.drawChild(ViewGroup.java:2929)
08-02 23:27:35.264: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2799)
08-02 23:27:35.264: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.View.getDisplayList(View.java:12407)
08-02 23:27:35.264: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.View.getDisplayList(View.java:12453)
08-02 23:27:35.264: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2911)
08-02 23:27:35.264: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.View.getDisplayList(View.java:12345)
08-02 23:27:35.264: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.View.getDisplayList(View.java:12453)
08-02 23:27:35.264: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2911)
08-02 23:27:35.264: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.View.getDisplayList(View.java:12345)
08-02 23:27:35.264: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.View.getDisplayList(View.java:12453)
08-02 23:27:35.264: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2911)
08-02 23:27:35.264: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.View.getDisplayList(View.java:12345)
08-02 23:27:35.264: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.View.getDisplayList(View.java:12453)
08-02 23:27:35.264: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2911)
08-02 23:27:35.264: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.View.getDisplayList(View.java:12345)
08-02 23:27:35.264: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.View.getDisplayList(View.java:12453)
08-02 23:27:35.264: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2911)
08-02 23:27:35.264: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.View.getDisplayList(View.java:12345)
08-02 23:27:35.264: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.View.getDisplayList(View.java:12453)
08-02 23:27:35.264: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2911)
08-02 23:27:35.264: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.View.getDisplayList(View.java:12345)
08-02 23:27:35.264: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.View.getDisplayList(View.java:12453)
08-02 23:27:35.264: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.HardwareRenderer$GlRenderer.draw(HardwareRenderer.java:1144)
08-02 23:27:35.264: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.ViewRootImpl.draw(ViewRootImpl.java:2149)
08-02 23:27:35.264: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2021)
08-02 23:27:35.264: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1832)
08-02 23:27:35.264: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1000)
08-02 23:27:35.264: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4214)
08-02 23:27:35.264: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.Choreographer$CallbackRecord.run(Choreographer.java:725)
08-02 23:27:35.264: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.Choreographer.doCallbacks(Choreographer.java:555)
08-02 23:27:35.264: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.Choreographer.doFrame(Choreographer.java:525)
08-02 23:27:35.264: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:711)
08-02 23:27:35.264: W/o_.o_.t_.m_.MapTileMod_(1168): at android.os.Handler.handleCallback(Handler.java:615)
08-02 23:27:35.264: W/o_.o_.t_.m_.MapTileMod_(1168): at android.os.Handler.dispatchMessage(Handler.java:92)
08-02 23:27:35.264: W/o_.o_.t_.m_.MapTileMod_(1168): at android.os.Looper.loop(Looper.java:137)
08-02 23:27:35.264: W/o_.o_.t_.m_.MapTileMod_(1168): at android.app.ActivityThread.main(ActivityThread.java:4745)
08-02 23:27:35.264: W/o_.o_.t_.m_.MapTileMod_(1168): at java.lang.reflect.Method.invokeNative(Native Method)
08-02 23:27:35.264: W/o_.o_.t_.m_.MapTileMod_(1168): at java.lang.reflect.Method.invoke(Method.java:511)
08-02 23:27:35.264: W/o_.o_.t_.m_.MapTileMod_(1168): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
08-02 23:27:35.264: W/o_.o_.t_.m_.MapTileMod_(1168): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
08-02 23:27:35.264: W/o_.o_.t_.m_.MapTileMod_(1168): at dalvik.system.NativeStart.main(Native Method)
08-02 23:27:35.294: W/o_.o_.t_.m_.MapTileMod_(1168): RejectedExecutionException
08-02 23:27:35.294: W/o_.o_.t_.m_.MapTileMod_(1168): java.util.concurrent.RejectedExecutionException: Task org.osmdroid.tileprovider.modules.MapTileFilesystemProvider$TileLoader@41975590 rejected from java.util.concurrent.ThreadPoolExecutor@418d8d28[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 56]
08-02 23:27:35.294: W/o_.o_.t_.m_.MapTileMod_(1168): at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:1967)
08-02 23:27:35.294: W/o_.o_.t_.m_.MapTileMod_(1168): at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:782)
08-02 23:27:35.294: W/o_.o_.t_.m_.MapTileMod_(1168): at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1303)
08-02 23:27:35.294: W/o_.o_.t_.m_.MapTileMod_(1168): at org.osmdroid.tileprovider.modules.MapTileModuleProviderBase.loadMapTileAsync(MapTileModuleProviderBase.java:147)
08-02 23:27:35.294: W/o_.o_.t_.m_.MapTileMod_(1168): at org.osmdroid.tileprovider.MapTileProviderArray.getMapTile(MapTileProviderArray.java:119)
08-02 23:27:35.294: W/o_.o_.t_.m_.MapTileMod_(1168): at org.osmdroid.views.overlay.TilesOverlay$1.handleTile(TilesOverlay.java:170)
08-02 23:27:35.294: W/o_.o_.t_.m_.MapTileMod_(1168): at org.osmdroid.util.TileLooper.loop(TileLooper.java:34)
08-02 23:27:35.294: W/o_.o_.t_.m_.MapTileMod_(1168): at org.osmdroid.views.overlay.TilesOverlay.drawTiles(TilesOverlay.java:149)
08-02 23:27:35.294: W/o_.o_.t_.m_.MapTileMod_(1168): at org.osmdroid.views.overlay.TilesOverlay.draw(TilesOverlay.java:136)
08-02 23:27:35.294: W/o_.o_.t_.m_.MapTileMod_(1168): at org.osmdroid.views.overlay.OverlayManager.onDraw(OverlayManager.java:109)
08-02 23:27:35.294: W/o_.o_.t_.m_.MapTileMod_(1168): at org.osmdroid.views.MapView.dispatchDraw(MapView.java:924)
08-02 23:27:35.294: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.View.getDisplayList(View.java:12407)
08-02 23:27:35.294: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.View.getDisplayList(View.java:12453)
08-02 23:27:35.294: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.View.draw(View.java:13182)
08-02 23:27:35.294: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.ViewGroup.drawChild(ViewGroup.java:2929)
08-02 23:27:35.294: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2799)
08-02 23:27:35.294: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.View.getDisplayList(View.java:12407)
08-02 23:27:35.294: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.View.getDisplayList(View.java:12453)
08-02 23:27:35.294: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2911)
08-02 23:27:35.294: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.View.getDisplayList(View.java:12345)
08-02 23:27:35.294: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.View.getDisplayList(View.java:12453)
08-02 23:27:35.294: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2911)
08-02 23:27:35.294: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.View.getDisplayList(View.java:12345)
08-02 23:27:35.294: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.View.getDisplayList(View.java:12453)
08-02 23:27:35.294: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2911)
08-02 23:27:35.294: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.View.getDisplayList(View.java:12345)
08-02 23:27:35.294: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.View.getDisplayList(View.java:12453)
08-02 23:27:35.294: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2911)
08-02 23:27:35.294: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.View.getDisplayList(View.java:12345)
08-02 23:27:35.294: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.View.getDisplayList(View.java:12453)
08-02 23:27:35.294: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2911)
08-02 23:27:35.294: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.View.getDisplayList(View.java:12345)
08-02 23:27:35.294: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.View.getDisplayList(View.java:12453)
08-02 23:27:35.294: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2911)
08-02 23:27:35.294: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.View.getDisplayList(View.java:12345)
08-02 23:27:35.294: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.View.getDisplayList(View.java:12453)
08-02 23:27:35.294: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.HardwareRenderer$GlRenderer.draw(HardwareRenderer.java:1144)
08-02 23:27:35.294: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.ViewRootImpl.draw(ViewRootImpl.java:2149)
08-02 23:27:35.294: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2021)
08-02 23:27:35.294: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1832)
08-02 23:27:35.294: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1000)
08-02 23:27:35.294: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4214)
08-02 23:27:35.294: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.Choreographer$CallbackRecord.run(Choreographer.java:725)
08-02 23:27:35.294: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.Choreographer.doCallbacks(Choreographer.java:555)
08-02 23:27:35.294: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.Choreographer.doFrame(Choreographer.java:525)
08-02 23:27:35.294: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:711)
08-02 23:27:35.294: W/o_.o_.t_.m_.MapTileMod_(1168): at android.os.Handler.handleCallback(Handler.java:615)
08-02 23:27:35.294: W/o_.o_.t_.m_.MapTileMod_(1168): at android.os.Handler.dispatchMessage(Handler.java:92)
08-02 23:27:35.294: W/o_.o_.t_.m_.MapTileMod_(1168): at android.os.Looper.loop(Looper.java:137)
08-02 23:27:35.294: W/o_.o_.t_.m_.MapTileMod_(1168): at android.app.ActivityThread.main(ActivityThread.java:4745)
08-02 23:27:35.294: W/o_.o_.t_.m_.MapTileMod_(1168): at java.lang.reflect.Method.invokeNative(Native Method)
08-02 23:27:35.294: W/o_.o_.t_.m_.MapTileMod_(1168): at java.lang.reflect.Method.invoke(Method.java:511)
08-02 23:27:35.294: W/o_.o_.t_.m_.MapTileMod_(1168): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
08-02 23:27:35.294: W/o_.o_.t_.m_.MapTileMod_(1168): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
08-02 23:27:35.294: W/o_.o_.t_.m_.MapTileMod_(1168): at dalvik.system.NativeStart.main(Native Method)
08-02 23:27:35.324: W/o_.o_.t_.m_.MapTileMod_(1168): RejectedExecutionException
08-02 23:27:35.324: W/o_.o_.t_.m_.MapTileMod_(1168): java.util.concurrent.RejectedExecutionException: Task org.osmdroid.tileprovider.modules.MapTileFilesystemProvider$TileLoader@4193daa0 rejected from java.util.concurrent.ThreadPoolExecutor@418d8d28[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 56]
08-02 23:27:35.324: W/o_.o_.t_.m_.MapTileMod_(1168): at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:1967)
08-02 23:27:35.324: W/o_.o_.t_.m_.MapTileMod_(1168): at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:782)
08-02 23:27:35.324: W/o_.o_.t_.m_.MapTileMod_(1168): at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1303)
08-02 23:27:35.324: W/o_.o_.t_.m_.MapTileMod_(1168): at org.osmdroid.tileprovider.modules.MapTileModuleProviderBase.loadMapTileAsync(MapTileModuleProviderBase.java:147)
08-02 23:27:35.324: W/o_.o_.t_.m_.MapTileMod_(1168): at org.osmdroid.tileprovider.MapTileProviderArray.getMapTile(MapTileProviderArray.java:119)
08-02 23:27:35.324: W/o_.o_.t_.m_.MapTileMod_(1168): at org.osmdroid.views.overlay.TilesOverlay$1.handleTile(TilesOverlay.java:170)
08-02 23:27:35.324: W/o_.o_.t_.m_.MapTileMod_(1168): at org.osmdroid.util.TileLooper.loop(TileLooper.java:34)
08-02 23:27:35.324: W/o_.o_.t_.m_.MapTileMod_(1168): at org.osmdroid.views.overlay.TilesOverlay.drawTiles(TilesOverlay.java:149)
08-02 23:27:35.324: W/o_.o_.t_.m_.MapTileMod_(1168): at org.osmdroid.views.overlay.TilesOverlay.draw(TilesOverlay.java:136)
08-02 23:27:35.324: W/o_.o_.t_.m_.MapTileMod_(1168): at org.osmdroid.views.overlay.OverlayManager.onDraw(OverlayManager.java:109)
08-02 23:27:35.324: W/o_.o_.t_.m_.MapTileMod_(1168): at org.osmdroid.views.MapView.dispatchDraw(MapView.java:924)
08-02 23:27:35.324: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.View.getDisplayList(View.java:12407)
08-02 23:27:35.324: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.View.getDisplayList(View.java:12453)
08-02 23:27:35.324: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.View.draw(View.java:13182)
08-02 23:27:35.324: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.ViewGroup.drawChild(ViewGroup.java:2929)
08-02 23:27:35.324: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2799)
08-02 23:27:35.324: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.View.getDisplayList(View.java:12407)
08-02 23:27:35.324: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.View.getDisplayList(View.java:12453)
08-02 23:27:35.324: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2911)
08-02 23:27:35.324: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.View.getDisplayList(View.java:12345)
08-02 23:27:35.324: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.View.getDisplayList(View.java:12453)
08-02 23:27:35.324: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2911)
08-02 23:27:35.324: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.View.getDisplayList(View.java:12345)
08-02 23:27:35.324: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.View.getDisplayList(View.java:12453)
08-02 23:27:35.324: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2911)
08-02 23:27:35.324: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.View.getDisplayList(View.java:12345)
08-02 23:27:35.324: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.View.getDisplayList(View.java:12453)
08-02 23:27:35.324: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2911)
08-02 23:27:35.324: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.View.getDisplayList(View.java:12345)
08-02 23:27:35.324: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.View.getDisplayList(View.java:12453)
08-02 23:27:35.324: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2911)
08-02 23:27:35.324: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.View.getDisplayList(View.java:12345)
08-02 23:27:35.324: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.View.getDisplayList(View.java:12453)
08-02 23:27:35.324: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2911)
08-02 23:27:35.324: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.View.getDisplayList(View.java:12345)
08-02 23:27:35.324: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.View.getDisplayList(View.java:12453)
08-02 23:27:35.324: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.HardwareRenderer$GlRenderer.draw(HardwareRenderer.java:1144)
08-02 23:27:35.324: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.ViewRootImpl.draw(ViewRootImpl.java:2149)
08-02 23:27:35.324: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2021)
08-02 23:27:35.324: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1832)
08-02 23:27:35.324: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1000)
08-02 23:27:35.324: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4214)
08-02 23:27:35.324: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.Choreographer$CallbackRecord.run(Choreographer.java:725)
08-02 23:27:35.324: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.Choreographer.doCallbacks(Choreographer.java:555)
08-02 23:27:35.324: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.Choreographer.doFrame(Choreographer.java:525)
08-02 23:27:35.324: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:711)
08-02 23:27:35.324: W/o_.o_.t_.m_.MapTileMod_(1168): at android.os.Handler.handleCallback(Handler.java:615)
08-02 23:27:35.324: W/o_.o_.t_.m_.MapTileMod_(1168): at android.os.Handler.dispatchMessage(Handler.java:92)
08-02 23:27:35.324: W/o_.o_.t_.m_.MapTileMod_(1168): at android.os.Looper.loop(Looper.java:137)
08-02 23:27:35.324: W/o_.o_.t_.m_.MapTileMod_(1168): at android.app.ActivityThread.main(ActivityThread.java:4745)
08-02 23:27:35.324: W/o_.o_.t_.m_.MapTileMod_(1168): at java.lang.reflect.Method.invokeNative(Native Method)
08-02 23:27:35.324: W/o_.o_.t_.m_.MapTileMod_(1168): at java.lang.reflect.Method.invoke(Method.java:511)
08-02 23:27:35.324: W/o_.o_.t_.m_.MapTileMod_(1168): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
08-02 23:27:35.324: W/o_.o_.t_.m_.MapTileMod_(1168): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
08-02 23:27:35.324: W/o_.o_.t_.m_.MapTileMod_(1168): at dalvik.system.NativeStart.main(Native Method)
08-02 23:27:35.354: W/o_.o_.t_.m_.MapTileMod_(1168): RejectedExecutionException
08-02 23:27:35.354: W/o_.o_.t_.m_.MapTileMod_(1168): java.util.concurrent.RejectedExecutionException: Task org.osmdroid.tileprovider.modules.MapTileFilesystemProvider$TileLoader@4143e028 rejected from java.util.concurrent.ThreadPoolExecutor@418d8d28[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 56]
08-02 23:27:35.354: W/o_.o_.t_.m_.MapTileMod_(1168): at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:1967)
08-02 23:27:35.354: W/o_.o_.t_.m_.MapTileMod_(1168): at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:782)
08-02 23:27:35.354: W/o_.o_.t_.m_.MapTileMod_(1168): at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1303)
08-02 23:27:35.354: W/o_.o_.t_.m_.MapTileMod_(1168): at org.osmdroid.tileprovider.modules.MapTileModuleProviderBase.loadMapTileAsync(MapTileModuleProviderBase.java:147)
08-02 23:27:35.354: W/o_.o_.t_.m_.MapTileMod_(1168): at org.osmdroid.tileprovider.MapTileProviderArray.getMapTile(MapTileProviderArray.java:119)
08-02 23:27:35.354: W/o_.o_.t_.m_.MapTileMod_(1168): at org.osmdroid.views.overlay.TilesOverlay$1.handleTile(TilesOverlay.java:170)
08-02 23:27:35.354: W/o_.o_.t_.m_.MapTileMod_(1168): at org.osmdroid.util.TileLooper.loop(TileLooper.java:34)
08-02 23:27:35.354: W/o_.o_.t_.m_.MapTileMod_(1168): at org.osmdroid.views.overlay.TilesOverlay.drawTiles(TilesOverlay.java:149)
08-02 23:27:35.354: W/o_.o_.t_.m_.MapTileMod_(1168): at org.osmdroid.views.overlay.TilesOverlay.draw(TilesOverlay.java:136)
08-02 23:27:35.354: W/o_.o_.t_.m_.MapTileMod_(1168): at org.osmdroid.views.overlay.OverlayManager.onDraw(OverlayManager.java:109)
08-02 23:27:35.354: W/o_.o_.t_.m_.MapTileMod_(1168): at org.osmdroid.views.MapView.dispatchDraw(MapView.java:924)
08-02 23:27:35.354: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.View.getDisplayList(View.java:12407)
08-02 23:27:35.354: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.View.getDisplayList(View.java:12453)
08-02 23:27:35.354: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.View.draw(View.java:13182)
08-02 23:27:35.354: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.ViewGroup.drawChild(ViewGroup.java:2929)
08-02 23:27:35.354: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2799)
08-02 23:27:35.354: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.View.getDisplayList(View.java:12407)
08-02 23:27:35.354: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.View.getDisplayList(View.java:12453)
08-02 23:27:35.354: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2911)
08-02 23:27:35.354: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.View.getDisplayList(View.java:12345)
08-02 23:27:35.354: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.View.getDisplayList(View.java:12453)
08-02 23:27:35.354: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2911)
08-02 23:27:35.354: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.View.getDisplayList(View.java:12345)
08-02 23:27:35.354: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.View.getDisplayList(View.java:12453)
08-02 23:27:35.354: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2911)
08-02 23:27:35.354: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.View.getDisplayList(View.java:12345)
08-02 23:27:35.354: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.View.getDisplayList(View.java:12453)
08-02 23:27:35.354: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2911)
08-02 23:27:35.354: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.View.getDisplayList(View.java:12345)
08-02 23:27:35.354: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.View.getDisplayList(View.java:12453)
08-02 23:27:35.354: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2911)
08-02 23:27:35.354: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.View.getDisplayList(View.java:12345)
08-02 23:27:35.354: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.View.getDisplayList(View.java:12453)
08-02 23:27:35.354: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2911)
08-02 23:27:35.354: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.View.getDisplayList(View.java:12345)
08-02 23:27:35.354: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.View.getDisplayList(View.java:12453)
08-02 23:27:35.354: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.HardwareRenderer$GlRenderer.draw(HardwareRenderer.java:1144)
08-02 23:27:35.354: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.ViewRootImpl.draw(ViewRootImpl.java:2149)
08-02 23:27:35.354: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2021)
08-02 23:27:35.354: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1832)
08-02 23:27:35.354: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1000)
08-02 23:27:35.354: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4214)
08-02 23:27:35.354: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.Choreographer$CallbackRecord.run(Choreographer.java:725)
08-02 23:27:35.354: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.Choreographer.doCallbacks(Choreographer.java:555)
08-02 23:27:35.354: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.Choreographer.doFrame(Choreographer.java:525)
08-02 23:27:35.354: W/o_.o_.t_.m_.MapTileMod_(1168): at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:711)
08-02 23:27:35.354: W/o_.o_.t_.m_.MapTileMod_(1168): at android.os.Handler.handleCallback(Handler.java:615)
08-02 23:27:35.354: W/o_.o_.t_.m_.MapTileMod_(1168): at android.os.Handler.dispatchMessage(Handler.java:92)
08-02 23:27:35.354: W/o_.o_.t_.m_.MapTileMod_(1168): at android.os.Looper.loop(Looper.java:137)
08-02 23:27:35.354: W/o_.o_.t_.m_.MapTileMod_(1168): at android.app.ActivityThread.main(ActivityThread.java:4745)
08-02 23:27:35.354: W/o_.o_.t_.m_.MapTileMod_(1168): at java.lang.reflect.Method.invokeNative(Native Method)
08-02 23:27:35.354: W/o_.o_.t_.m_.MapTileMod_(1168): at java.lang.reflect.Method.invoke(Method.java:511)
08-02 23:27:35.354: W/o_.o_.t_.m_.MapTileMod_(1168): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
08-02 23:27:35.354: W/o_.o_.t_.m_.MapTileMod_(1168): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
08-02 23:27:35.354: W/o_.o_.t_.m_.MapTileMod_(1168): at dalvik.system.NativeStart.main(Native Method)

And tiles doesnt work any more... i start getting grey tiles and nothing else...

i cant find any way to solve it..

can someone help me?

thanks

Trying to display many polygons overlay

Hi, i need to overlay many (clickable) polygons on the map (over 5000), so the normal Polygon overlay is slow in performance.
I've tried many ways with no luck.
My idea is to create a custom bitmap overlay, drawing on a bitmap canvas only polygons that are inside current bounding coordinates.
Moreover i would to redraw the overlay only when the user has finished to zoom or panning, not during this operation, for performance reasons.
Can someone please point some help to me?
Thanks.

Pathoverlay does not work with 512x512 tiles.

I am trying to use

public static final OnlineTileSourceBase MAPNIK = new XYTileSource("Mapnik",
ResourceProxy.string.mapnik, 0, 18, 512, ".png", "http://tile.openstreetmap.org/");

but it seem with 512x512 size tiles.

1.Pathoverlay does not appear with 512x512 tiles.Its working fine with 256x256 though.
2. myLocationoverlay is not visible
3. if i am setting setScrollableAreaLimit it does not show any of tiles at all.
4. itemizedoverlays can be drawn.

@kurtzmarc @neilboyd any workaround??

Custom projection for tile source

Hi:

First, very glad to see that osmdroid being migrated to github. :)

I noticed that osmdroid use the projection class org.osmdroid.views.util.Mercator directly now, the projection is not bound with the tilesource or something else, but we have some tiles with another projection, so I wonder if we can use osmdroid to add them?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.