Android OSM zoom level 19 and above - java

I'm new to Android Development. I have an application that shows a MapView and I've set a bounding box to restrict the user to only viewing the tiles in a specific area. The issue I have is that I need to zoom in, past level 18. Which I've also been able to do so by setting the max zoom level. However, there aren't any tiles available from the default tile provider for zoom 19 and above I really only require up to 20, 21 max too.
Is there a way for me to create my own tiles? Have custom tiles? Generate my own map? Or if there's a tile provider that allows me to zoom into the map past level 18 and still be able to see the map tiles?
I need a higher zoom level because I'm overlaying custom markers and if it's not zoomed in enough, the markers overlap. If I scale the marker size down, it's not visible enough...
EDIT: Some other specific details I missed on my initial post,
I'm using OpenStreetMap because I need the feature it provides where I can edit the roads and tag them accordingly for future routing uses.
Also, the tiles that Google Maps provides for my selected geographical area is outdated due to recent construction and renovation. That makes the map unreliable for routing the application user.
The application's purpose is to route the user. Hence the requirement to zoom in closer to see many markers, individually. (There are a number and row of markers placed very close together, intentionally.)

Assuming you using Osmdroid, there are some know issues with > 19 zoom levels to be aware of. Basically it's a precision loss issue. There's a potential solution, however the project owner doesn't want to merge it.
Is there a way for me to create my own tiles?
Yes. There's a few tools, such as Mobac, and MapBox as well as the Ersi based products. I'm sure there are others.
Have custom tiles?
Yes, you can load any tiles source you want, online or offline that supports or can be translated to OSM's slippy map format, commonly referred to as XYZ.
Generate my own map? Or if there's a tile provider that allows me to zoom into the map past level 18 and still be able to see the map tiles?
Bing, and probably other sources, have tiles that are at 19+ for certain geographic regions, but not all. Keep in mind that storage requirements (if using offline maps) increase exponentially with zoom level.

Related

Create a Synthetic Vision System

I would like to add this feature to my android app:
https://en.wikipedia.org/wiki/Synthetic_vision_system
In short it I believe it is a terrain heightmap. I specifically need help with rendering the terrain. The rest of the display I can accomplish.
After a day of google I appear to be no closer. My research seems to point to using opengl, heightmaps and SRTM. However I have no clue how to tie it all together. None of the java examples are android specific.
Alternatively maybe using openstreetmaps and a tile overlay but I cant establish if it is possible in 3D.
The app will be a moving map based on GPS position of the aircraft. As the aircraft moves over the earth the terrain ahead will be updated.
Can someone point me in the right direction?
I can recommend you to use a vector format with few layers. For example, layer of depth, layer of landscape type and layer of objects. To build 3D from this data you need to divide the map in small tiles and load data in memory for visible area only. Your 3D builder will parse this data. E.g. a simple renderer (using OpenGL)... You create mesh as large as tile size and with enough count of vertexes. Next, you parse depth layer and move each vertex along Z-axis like it need. After you need to set color like it specified in type layer. And finally, you need create and locate objects like object layer data (it's already built-in meshes). When you build needed tiles you pass it to renderer.

How to implement a scrollable, zoomable map in JavaFX/ScalaFX?

I am implementing a map as a computer game accessory; it should show the geography of the computer game with a few informative overlays. I wonder what's the best way to achieve this in JavaFX, or more precisely ScalaFX.
Right now, I have a very naive implementation:
I have tiles for the map in different zoom levels. For each zoom level, I arrange ImageViews in a Group and transform that group, so that all zoom levels use the same coordinates.
A separate group with the same coordinates is used for my overlays.
I zoom using the mouse wheel and make only one zoom level visible, depending on the current zoom.
I pack all this into a ScrollPane.
That has a few limitations:
all tiles, for all zoom levels, are loaded at startup. That's ugly, but works in my particular use case.
using a ScrollPane only works if the map has limited bounds. Again, fine here, but not for maps in general.
the UX is weird: the ScrollPane scrolls with the mouse wheel, while most maps scroll per drag and drop; most maps zoom with the mouse wheel or pinch to zoom. It's critical that zooming preserves the "anchors" (mouse/touch positions) during the gesture. (It would also be nice to be mobile-ready out of the box, but that's just dreaming right now...)
different levels of detail in the overlay, depending on the current zoom, are possible, but probably not very efficient or convenient.
Obviously, this is one of the approaches I tried. This question mentions a library by some eppleton, but it doesn't seem to be maintained, and the blog that used to describe the library doesn't exist anymore. Also, it seems to focus on providing a game engine, with a tile having meaning to the game; a tile in a map is just an image, and the overlay doesn't care where one tile begins or ends.
To finish this with a concrete question: Are there any libraries or techniques that I can use to fulfill my needs? I'm especially interested in my third bullet point (UX), but I guess that if there's a suitable approach, it would cover points 1 to 3.
UPDATED:
Few more options are on the table now:
Gluon Map
GMapsFX
One option is not to build but use existing open source project, such as openmapfx

Tracking position on google maps via GPS

I'm working on a project, which is basically to track a person in real-time via GPS. His position has to be updated at all times on Google maps (or any other). Here is how it looks like:
We are already set to receive the co-ordinates of the person (via GPS).
We want the maps available offline. (We're receiving GPS co-ordinates (X,Y) through a wire so lack of internet won't be a problem in that aspect).
Then we code in Java, such that the map is visible to us and the position of the person is marked by a dot (or circle).
My questions are:
Is it possible to download the Google maps (or any other) and then work on them to achieve what I've mentioned?
I'll be making the framework in swing. But for the dot-action, which other components will be required?
How will be the co-ordinates that I receive from GPS, interpreted on the maps? I mean in code I'll have to tell the program where to draw the dot, right? As of now I'm thinking, I'll program the position of the dot, such that (co-ordinates received from GPS = co-ordinates on google maps). But I've a feeling it won't be as simple. So please guide how can this be achieved.
From my research, no. It is not possible. The only 'offline' features is offline map caching INSIDE the Google Maps App for iOS and Android. If you're on Windows, you may want to try these applications that claim they can grab the maps. I'm on OSX, so I can't test them.
Since you'll have the offline map (a folder with an HTML), in Swing you will simply create a Browser component (it exists in SWT, don't know if they are in Swing too). The browser should have APIs like setUrl or/and setHtml. You will extract the HTML from the maps, draw the dots directly in the HTML code (with JavaScript), then include the resulting HTML in the Swing browser.
This is the easiest part. You can draw on the map with JavaScript (with GoogleMarker components - google it). When you instantiate those markers, you pass a latitude and a longitude from your GPS. Then the map will know where to draw them.

Google Maps Heatmap Android Display

I have multiple geo-locations that have a weight of +1 or -1 in an android app. I'd like to be able to plot these points as an overlay to a google-maps activity. I thought that the best way to view the data is not on a point-by-point basis but by shading regions depending on the average density of its values. I have done a few searches and I want a heatmap-like rendering and was wondering if anyone had any direction as to how to accomplish this.
If you are okay with using a library then you can use Mapex.
https://code.google.com/p/mapex/source/browse/MapExLib/

How could I turn coordinates x,y,z coordinates of several objects into an Android app that displays the position of these objects?

I am using eclipse with the adk android plugin and I am completely lost
That would depend on what do you mean by displaying their location:
Relative to each other on a blank screen.
Read up on distance calculation in coordinates and draw the locations relative to their distance from each other.
On a map, each one separately from the other or together.
Use a web/binary API for map display like Google Maps (don't want to spam and post links with my reputation), or write your app to display Open map data from sources like OpenStreetMap.
On a satellite/aerial images.
Pretty much the same as #3 just you have less options to investigate and try.
If you were a bit clearer in your question, I could have been more specific with the answers, if you edit your question and clarify more, I could be more specific.

Categories