Make my own "Google Maps" using device location - android

Im on my final project in which I would like to build an android app especifically for the university context. Therefore I would like to use geolocation but for matters of detailed information (colors, shapes, buildings, etc) and gamefication I would like to draw my own map and the user should be able to see his position on this map. So I would have this drawn map and I would use the device's location service and transform the coordinates to a position on my map.
I'm kinda lost on this, didn't find much on the web. So I would apreciate if anyone could point me a direction or if anyone could tell me how hard would it be to implement. Would it be as simple as a function Point foo (double lat, double lon);?
Thanks in advance.

Drawing the whole map completely would be rather difficult and would involve loads of extra work, thus I would suggest you an alternative that would allow you to have your own drawings, on top of the already made Map.
You could for example use the groundoverlay, for items that you want to draw yourself. and then use the google maps under it to show the map, and to handle any positioning etc.

Related

Storing (caching) Google map with given radius and using it while offline

First of all if this one is a duplicate, please refer me to the original thread(s), as I have failed to find the exact thing I was searching for.
Basically for some time now I am developing an application for the client and it was all going well up until this point.
The client requests to be able to
I) While online:
Access Google map
Set the point by clicking on map
Store a portion of the map around the above mentioned point locally as per the radius he/she selected (eg. 3km)
II) While offline:
Access the map he stored in above steps.
The application should draw the path as he moves as per GPS coords received from another device via BT.
The ability to zoom in/out, scroll around map and everything else that standard google map allows.
I am completely lost on this one and would like at least someone to point out the right direction for something like this.
I'm well aware how to handle most of the above while Android device is online, but have no idea how to do this while offline.
I pretty much need help with I-3, II-1, and maybe II-3.
PS. I don't really need BT tutorials and guidance (mentioned in II-2), that part is handled, I just pointed out the source of coords.
Cheers
You can use TileProvider. The TileProvider provides the images that are used in the tile overlay. You should be able to save portion of map and create your own tileprovider and access tiles locally.

Indoor Map of Building - Android

I'm trying to create an app that will tell a person what zone of a building they are in. I'm using bluetooth dongles to get an approximate location, as oppose to exact location, and show the user on a map whereabouts they are. I would like it just to highlight the zone they are in, instead of a specific location.
I can get my hands on a floor plan of the building I am using so I'm just wondering if there is an easy way to incorporate this into some kind of map with an existing API? I found a question here which states that they just use an overlay on the image to show a marker of where the person is. Would this be a bit easier?
This is for my final year project so I would like to have some sort of flashy map if possible but I'm not sure where to start looking or if it's possible.
I also found this question which gives a great variety of apps that implement and indoor map, but I don't think I can just take this small piece of functionality that I need out of them as they seem to be complete apps.
Any information would be a great help. Anyone with experience in this sort of thing please share your knowledge :)
It doesn't sound like it'd be too complicated to just write your own custom view for this. Draw the map image to the canvas. Then for the zone the user is in, draw another 'highlight' graphic on top of the map that you just drew.
If you're not sure how to do this, there's a rather basic guide on how to create your own drawable widgets which should point you in the right direction. There are plenty of examples on drawing images to the canvas, eg this one.

Displaying a list of pre-determined Geopoints

My app that I'm working on is mostly informational. I have a MapView setup right now to use MyLocationOverlay to track where the user is. I'm planning on having a list of coordinates for all of the buildings in the area. If a user wants to see where it is on the map, they can open up my dialog, find the building in the list, click it, and have an overlay drawn for it.
I'm not sure the correct way to go about for this. I already know how to create map overlays. Would the best approach be to have a HashMap for latitudes and one for longitudes, and then go out and grab the coordinates manually to store into those maps? By manually I mean having to find the coordinates myself and code them in by hand. If I do this, what is the best way to find them manually? I noticed by poking around in the javascript for Google Maps that there was a lat/lng value for the center of the map, but it would be a pain to do this for 100+ buildings.
Or should I be making a Google Maps query for the building and getting the coordinates for the overlay like that? I have done some searching, but have no clue what to do if this is the best way to do it. I was also thinking that I might run into some query limit by doing it this way rather than having the coordinates programmed directly into my app.
I'm not a beginner with Android or programming, but my data structures knowledge is a bit rusty. Any ideas would be greatly appreciated (maybe I'm approaching the whole thing wrong).

Can we use our own map in android?

Can we use our own map(Like our house map) and then use GPS to show where we are in the map?
If it is possible then how to do it?
You can do anything you want, but if you are asking if there is an easy way to do this, no.
You would have to produce a scale drawing, then map the pixel space to the scale of the image, know what geopoints represented the corners of your map, then project that onto your scaled display image.
Some open source products use tiled images similar to google maps, but they use OSM data, I suppose if you were dedicated you could use that and turn your map into tiles but I would think for your purposes it would be easier to do this your self.
You might check the google code repository etc. and other open source venues and see if anyone has done anything similar to this.
Also the best accuracy you are going to get is about 2m, and certainly not indoors (if you got a signal at all)

android: show direction in google maps

i am developing an android application that use map view.
i can add point to the map, zoom, get current location and animate to point.
but how to get direction between 2 points?
when user click on point to show direction between current location and clicked location.
Thanks
but how to get direction between 2 points?
Math. This has nothing to do with Android. It has little to do with maps, even. It has everything to do with math.
Depending on the distances involved, you might be able to get away with treating things as plain Carteisan coordinates and do the necessary trigonometry. Over a significant distance, though, the curvature of the Earth starts to play a role, and the math will get harder.
You might consider using a search engine to find whatever versions of the formulas you would like to use.
in order to show a direction on maps (android)
you can try to make an Overlaying custom route on your application.
We shall further assume that the route returned may contain additional information such as the local slope of the route (which could be important if one is negotiating the route in a wheelchair, for example). Since this requires a network access that could block the main UI thread if there are network difficulties, we shall also use this example to introduce the important skill of putting time-consuming or potential UI-blocking tasks on a background thread. and use AsyncTask to run the process in the background. To use AsyncTask we must subclass it.
maybe this is helped you out.

Categories

Resources