Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions must demonstrate a minimal understanding of the problem being solved. Tell us what you've tried to do, why it didn't work, and how it should work. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I have succeeded to determine the walking direction and the distance of a person.
I then wish to plot his or her position on the screen.
How may I do that?
I understand the question may not be that specific, but what I wish to get from you guys are just some ideas.
e.g. which section should I read in the Android Development website or which external library should I import to help?
Use googles LocationClient to get location updates. On every update get the lat and long of the position provided.
You can use Location Client along side google maps to plot location data. Every update you will just remove your marker and place it at the new location. Note you do not have to remove you marker. Then you will have a plot of the locations that you were at. I have seen trail programs that use this to plot hiking paths.
http://developer.android.com/reference/com/google/android/gms/location/LocationClient.html
There is also a locationmanager that will let you work a little more with the location providers.
http://developer.android.com/guide/topics/location/strategies.html
Here is an example program on the android dev site.
http://developer.android.com/training/location/retrieve-current.html
If I understand correctly, you are looking to plot this data in a graph. I would highly suggest using AndroidPlot (http://androidplot.com/) from here you can download their sample code to make a simple graph.
If you are looking to then to then show the person how far they went and for how long you can plot this data pretty easily in a graph.
If you really wish to show this data on a map then you do not want to use AndroidPlot.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 3 years ago.
Improve this question
I'm getting in my directions as explained in the docs. My link looks like this:
https://maps.googleapis.com/maps/api/directions/json?origin=lat,lng&destination=lat,lng&mode=walking&key=KEY
Which works perfectly fine. However, it doesn't matter what origin or destination I set, I'm always getting a JSON file with a singe route. See the below screenshot:
https://ibb.co/x7K4B1c
Is this correct? Is there any way I can get multiples routes?
From the Directions API documentation
alternatives — If set to true, specifies that the Directions service
may provide more than one route alternative in the response. Note that
providing route alternatives may increase the response time from the
server. This is only available for requests without intermediate
waypoints.
You need to set the alternatives to get one or more routes from origin to destination.
In your case you may be try like this and see the output
https://maps.googleapis.com/maps/api/directions/json?origin=lat,lng&destination=lat,lng&mode=walking&key=KEY&alternatives=true
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I have created an android app. In that I am generating randomly 10 Latitude and 10 Logitude. (and 10 names given to each marker) and displaying it on GoogleMap
But, now I want to put a radar on the map which gives a direction.. and accordingly I want to show which person is in which direction..
Please check the image, I want to show something like this.
Any Help??
Thank You...
Ok, so for start you can try detect the direction. To do that look over this question&answer and try to do this: Calculate compass bearing / heading to location in Android . In this way you can know where the user is looking at. After that maybe you could have an png image that you could draw over the map headed to the direction calculated like in the link I just posted.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I'm trying to make an Android application that displays a map of a Park and when a user taps on a certain location on the map, the application goes to another screen.
Problem is that currently my map of the park is in a .jpg format. Which mapping API is best for my application and how would I go about converting this .jpg map into a format that is accepted by the API.
Thanks!
Adding an overlay for Google maps with a custom map is pretty easy to do, the sample code works out of the box.
To overlay the map you need to have a rough idea of the gps coordinates of the park. There is the sample code for overlays using a jpg is here: https://code.google.com/p/android-maps-extensions/source/browse/google-play-services-samples/src/com/example/mapdemo/GroundOverlayDemoActivity.java?r=fd7175206a82da6d87b773e968d52849b4c107fb
Clone the entire project and import it into Eclipse:
git clone https://code.google.com/p/android-maps-extensions/
After you have it running and installed on your device, you will want to get an API key here:
https://code.google.com/apis/console
Full instructions are here if you get stuck:
https://developers.google.com/maps/documentation/android/start
There are other demos to make your map more useful for example:
traffic info to get to the event/park
a 3D perspective if you want for eye candy
GPS of users current location with relation to the park
make the overlay opaque, or slightly transparent
custom markers so the user can tap and open another screen
Well, you can use the google maps api v2 in android, and you create an Overlay map and implement the getTile, here you can find more info:
https://developers.google.com/maps/documentation/android/reference/com/google/android/gms/maps/model/TileProvider
but the only thing is, change the properties in order that the maps ask for the tile you want to send, lest say that you have 4 tiles for your map, so use a zoom level that only allows 4 tiles to be delivered and then you return the corresponding tile to the map.
also you have to set the type map to NONE.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
Does anyone know how to create a 2D building map for example a mall, and also locate or pinpoint the user current location? My classmate told me to use Google Maps API, but I prefer not to use it.
I've a friend that swears by OpenStreetMap so if you don't want to follow the Google route then this could be a good option. They too are interested in creating maps for indoor space and lots of information can be found here:
http://wiki.openstreetmap.org/wiki/IndoorOSM
I'm no expert, but by the looks of it, it seems as if there are tools, such as JOSM, which allow you to create the indoor maps - a quick start guide to using JOSM indoors can be found here. It does seem to assume that you have floor plans of a building. As far as I'm aware (correct me if I am wrong) there is currently no software, that lets you walk around a building creating a map!
Locating a users current location is difficult. GPS tends not to work in indoor spaces, so you need to consider which would be the best option. Additionally if you are working with a multi-floored building then you need some method to work out what floor the user is on. There are a number of possible solutions:
Attach GPS Antennae to the buildig and use a repeater to boost the coverage to the rest of the building
Google uses wi-fi networks and mobile masts to determine location. If you want to know more about this approach check out WifiSlam. They're now owned by Apple but there are some interesting articles in the top 10 or so search results of Google about them and this technology!
Use image recognition to determine the users location. You could use something like Google Goggles. Users could take images of the room-numbers/shop-signs/QR codes which are then processed followed by a location being provided
None of these are particularly easy, so perhaps a different approach could be taken!
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
How to store Google map file into Sqlite database?
Google maps has no real support for caching. There is no public API to get the map data in its entirety and cache it up for later usage. Thus, you're not really going to be able to view that data on a map if the user exits the map activity and goes offline. You can of course save placemarks and such to KML or a database (maybe even with a jpg snapshot of the map), but that doesn't sound like what you want.
Google Earth does have support for caching, however the cache is very small (I don't know the max size off the top of my head). Furthermore, you can't push any data through Google Earth on the phone since it has no public API. If you happen to have a Google Earth Enterprise server sitting around, you can point the phone at your server and use network links to serve data up to the globe with some evil black magic trickery.
In that case, I think you want to store only the co-ordinates into the database! You can get it by exploiting GPS. I am not a seasoned programmer, but trying to see myself, if I get an example answer soon, i will comeback :)