Create and display indoor map on Android - android

I'm developing an Android application and I would like to display an internal (indoor) map of some buildings, but I don't know where to begin: I want to create a custom kml file (how it's possible to create it? with which tool?) and display it in a fragment.
I already have it working with external maps (simple GoogleMap in MapFragment), so it would be super to have the kml file placed 'over' the GoogleMap, like real indoor maps.
Thanks

My project is also about indoor maps. I want to share my experience:
First, I tried to use google map but google does not support all countries and my country is not supported. Therefore, I was not able to use google maps although it could be an easy way.
Second, I tried to use open street map which does not render indoor elements. It would be crazy because you have to use lost of other gis tools in order to do it.
the last, I thought why do I need geographical data. All of them - google, osm - are geographical maps which has geographical data. So I do not need this. I rendered my map and I used x,y coordinates of my map's jpg file. I added all of important place's x,y coordinate so I can search them. And it is most easy. And you can use tileview library which is so easy.

Related

Make android google maps polyline appear above street names?

How to add a polyline to google map in android above street/area name?
I think this is not possible in an easy way due to how google maps API handles the "background".
If you set the background to normal or hybrid, the map is drawn as a background either in road view like your screenshot or in satellite view if hybrid is selected.
Then all the users features are drawn (and eventually overlays, lines, poligons, then points and lastly, street names. You can't really change this, but you could do a trick:
- Use just the satellite view (so no roads will be added).
- Remove the google background and add an alternative one (there are different services like Open Street Map, Mapnik ecc that allows it).
Following the second choice could also allow to add googlemaps background from web api, but I really don't advice to do it, since you are downloading tiles in a non standard way for google.

What libraries to use for Android Project with maps and routing?

Alongside with my friends I am about to develop an android application. The application will use maps a lot, finding routes, placing markers, drawing predefined routes, stuff like that.
There is this Google Maps APIv2. So I tried it, write some code and looks good. I am able to place markers and draw polylines, however my application will have some predefined routes. One route is set of LatLng points. So I just add these points to PolylineOptions and add it to map. Great, it works.
But these predefined routes will be created in web-based application also using Google Maps APIv2 or similar api/library. Some streets are not straight they are curved so you need to create a lot of LatLng points to get it look nice which is very important. I can do this but I want to put only two LatLng points - at the beginning of the street and at the end.
Here is the image:
On the left, route has only two LatLng points (red dots) and that is desired shape of line. On the right same route with 2 LatLng points gives me route coloured in light blue, and this is what actually happens if I just add polyline to GoogleMap object. In order to create same effect as in left image, I need to create many LatLng (red dots) points which is not appropriate for those who will create these routes. So this leads us to routing problem which can be solved by using Google Directions API. Which solves the problem of drawing routes with less markers. Basically what I understood, this API for directions actually creates a lot of these LatLng points that I draw using for-each loop as seen on right part of picture above. And I need to contact Google Web Service for this so I need to have Internet connection - and this is the problem.
Sometimes internet will not be available hence I need some alternative solution. I've heard of Open Street Maps, but I am not sure how to use it and does it needs internet connection for creating these routes.
Is there any free library that offers offline routing and showing maps offline? Basically all map interactions must be done without use of internet.
But it is understandable if internet connection is needed only for the first run of application as it is needed for Google Maps APIv2, well application crashes until I turn on internet, after which any next run I do not need internet..
A web based application will be made for creating these routes and routes will be created by users for whom we develop this application. And as users can be very annoying they will demand some user-friendly and easy interface for creating routes. Telling them that they need to create 100 to 500 points for each route, and if there is 60-70 routes they will gladly say NO to our application.
Any advice? If it is possible, I can write my own routing algorithm for Google Maps to work offline, I am very skilful at "Algorithms and Data Structures" - any guides/tutorials for this? But I guess this map is just set of tiles, and does not have necessary information for finding route.... So please correct If I am mistaken for anything.
You can use the Scout SDK (provides a free usage quota) as it offers full offline maps, routing & navigation.
Have a look into the open source projects GraphHopper, Mapsforge and OpenScience-VTM which can do routing and/or maps offline. And all use OpenStreetMap data. Other projects exists of course, have a look here and here.
Also have a look into the GraphHopper map matching component which could be interesting for your specific use case and can work offline too.
(Note I'm the author of GraphHopper)
If it is possible, I can write my own routing algorithm for Google Maps to work offline
No you can't, the data is not open nor you can buy the data to my knowledge.
Another option is OsmAnd. The OSM wiki also has some information about OsmAnd and even more information about OSM on Android in general as well as pages about rendering and routing.

Creating custom maps over Google Maps is possible nowadays?

A few years ago we wanted to add a custom map over Google Maps (like the World looks like Midearth), but back then it was not possible. Now, I can see multiple apps that have their own overlay over Google Maps.
I tried creating my own map via Google Maps using their suggestions, but this was only for pins and routes.
What I need is to have the real cities on the map (like Rome, London, Paris), but with my own custom graphics for everything (map tiles, pins, etc.).
What document shall I read for this? I am sure I missed something on Google Maps.
Yes! It is possible with Google Map V2. You should consider using TileOverlay.
Essentially, every time GoogleMap wants to draw tile for specific coordinate - it asks you to provide this tile. You can use either static tile (see TileProvider) or you can provide URL, so GoogleMap goes to your web server and downloads this tile automatically (see UrlTileProvider)
I think what you want is GroundOverlay which can be any bitmap image that will be displayed on top of the basemap. You can even control the translucency of your map.
You most likely want to have your map image oriented north up and be scaled according to Mercator projection if the scale of your map is large enough to include Rome, London, and Paris. But if your map covers a smaller area, you don't need to worry about Mercator projection.

How to identify the roads on the map to route just as Google Maps does?

do you know how can we create our map and show the ways from a certain locations to destinations ? Without using google map , just using a picture of a map , is there any way to draw routes on it?I am not asking projects or codes , just need some suggestions related to drawings and considering the obstacles in the way ?Thank you
You should have your way points in somewhere(maybe in db or in xml file etc) and also for getting map base you should have a map provider like yahoo, bing, google or openstreetmap(which is free to use - no api key needed considering others)
after having these two sources you can use Geoserver(which is opensource map data manipulater and provider) to put these sources together and get them as map base image.
considering your "just using a picture of a map" is an owerwellming issue. Because you will have to do some calculation to find where to put your points programatically. So Geoserver does that automatically.
also I suggest you to hava a look at osmdroid and osmbonuspack they may help.

Best way to use a lot of Places of Interest on a Google map

I have a server with a lot of Places of Interest information. (long, lat, picture url, name, etc)
About 100.000 items.
What is the best way to: load/download it into Android, and
what is the best way to show them on a Google Maps?
For such a big amount of Markers I suggest you give KML Layers a shot.
With Google Maps you can either have google render all markers for you, (default: KMLLayers)
or you can rely on GeoXML3 for client side parsing.
The same applies to Android Google Maps. Layers can easily be added using this: How to draw a path on a map using kml file?

Categories

Resources