Java GIS framework with custom shaped markers - java

I need to find a open-source Java framework/library/api that would generate an map image with multiple coordinates markers. In particular I need to customize the shape of the markers (i.e. making the marker circle size bigger or smaller depending on external additional data). Moreover, it would be nice that the map would fit to the markers (so if I place markers only in Europe, the image would show Europe only, not the whole globe). Does any one know an Java API that has such functionality? I looked at things like geotools or jmapviewer but they seem to lack the features I require.

Related

How to plot a graph vertically in java?

I have to do a program that plot data vertically in java but I don't know what library to use to accomplish that. The datetime axis have to work vertically and the value of the varibles horizontally, also the graph can have multiples variables but with the datetime axis shared. The software will also have to have a line that says the value of all the variables. The following image is an example of what I want to do
Are you generating this graph as an output image? or as part of the UI of a larger interactive program? There are lots of options available for 3rd party libraries but I would just draw it myself if I were tasked with this. Would be pretty straightforward to mock up even in swing if you want to generate it and show it without exporting as an image.
simple example

Android map overlay with sprites pathfinding

I want to make an Android App, with a real map and a overlay for the map, where sprites are drawn (can be dots or small images).
This is a rather hard question, so I have made a sketch of a map of a small city, where only roads and streets can be seen. That might look something like this on the device:
Imagine the red dots to be bots, and they want to get to the yellow dot, assuming they know the position.
What Android Map API should I use to be able to:
Draw custom sprites on a given location on the map (geo-coordinates rather than screen coordinates).
Generate valid paths from the streets and roads on the map, which the dots can move on (black lines).
Use pathfinding to calculate the shortest routes, e.g. from red dot to yellow dot.
Must be able to draw more than 10 sprites on the map.
(the map doesn't have to support 3d views or street views. Plain old top-down view is just fine)
If no map API exists that does not meet these requirements, what are some other solutions?
I'm really excited about this project, but I'm having a lot of trouble getting started with it, so any help or guidance will be much appreciated.
EDIT:
It seems that there is no answer to my question. I will leave this open and report back with my own solution.
Google Maps Android API v2 and Marker class.
All valid paths? You probably should not need it if you use Android API v2 with real map drawn for you, but you can also try to use Google Directions API.
Google Directions API.
No API exist that can handle more than 10 objects. You probably need something from NASA.
Have fun coding.

How to make a SVG map in android? (and place markers on the map)

I'm making an app for a real life game. The app needs to use a custom map that uses scalar vector graphics (SVG). The map I'm using provides very accurate detail, such as door locations inside a building; This is why i'm using SVG instead of the maps api.
Now I know there is an api for svg (http://code.google.com/p/svg-android/), so here is what I need help with:
1) The image must be zoomable. The only reason for using the SVG graphics is for clean zooming.
2) I need to place dynamic markers (images, or buttons w/ numbers) on the SVG image. An SQL table has an image, and a location. The table will be updated, added to, and removed from. I need to place said images on top of the SVG image, and possibly each other. Coordinates and math aside, how do I place the images on top of each other (can't use XML since they aren't static).
I need to use Android 2.2
The default browser in 2.2 doesn't support SVG. You can target Opera Mobile, which supports SVG and other new technology much better, but it won't be a native app.
The first step I'd try would be designing the interface in Inkscape, then you can reference the .svg file from HTML and move elements with javascript.
flying-pigs,
If i understand your question, you want to display a SVG like that on your phone ? So you can display user location on that map.
I describe a working solution here : Add SVG Tile Provider
Let me know if you have other questions about GG Map

Is there a way to grid my google map in Android?

I've created a map I want to classify my map into Let's say hexagon grids like cellular networks so I can be able to color each hexagon independently, the only work around I found was to manually draw circles using the overlay class and the ondraw method, but in order to manually do so I'll have to create like thousands of circles. I need a hexagrid on the whole map so when I need to color a hexagon I just find it by Let's say it's name or number. does Android support such feature?
No, Android does not have a built-in hexagon overlay for Google Maps. It is conceivable that you could find a third-party component for this, but more likely you will need to implement it yourself.

android opengl game

I'm trying to develop a 2D game to android using opengl.
I know how to print images on the screen and animate them. But in my game I have a map and a want to zoom in and out and scroll the map. But I can't figure out the best way of doing it.
Can anybody help me?
I don't have any api examples but I did games design at college so I'll give my two bits.
The method you use will depend on your map style, size, functionality and format.
For example if you are looking for a very static non changing map, use a simple picture image. You can use the API frame for a picture view, enabling you to zoom in and out as you do in the gallery and to scroll on zoomed images, or in this case, zoom locations on your map.
Alternatively, if your map is based off a tiling system, a good example of this is the original Pokémon and Legend of Zelda games from the old game boy, then each area stores a tile 'thumbnail' for itself as a bitmap. These are then put into their appropriate locations on a grid depending on what areas are discovered.
This is the probably the most flexible way to build your map as you are not relying on a set bitmap for the entirety your map meaning it can change its look efficiently; you can build it as desired to show areas of choice (useful for if the map only reveals places the gamer has covered) and it also means you can do tile based overlay:
ie - if a certain area should contain treasure, theres a treasure icon overlayed on that tiles x,y position on the map grid.
I used the tiling option in my game projects from college and it made everything else map related easier. It also made the map side of things smaller storage wise.
The simplest approach would be to just call glTranslatef(-scrollX,-scrollY,0) followed by glScalef(zoom,zoom,zoom) before you render your map.

Categories

Resources