Totally confused attempting to integrate a map...Best way forwards? - android

I have been looking to implement a map in my website, and have really hit a brick wall - Have read so much, but am very confused. I just wonder if someone could offer a little help?
I have developed an Android App which generates a list of lat/long pairs and stores them in a remote MySQL DB. All I want to do is mark these points on a map, with a little pop up when clicked, indicating some other information about the user.
I have so far looked at Google Maps API and OpenStreetMap, although I really don't know where to begin! I don't know whether I should use Google Maps, as I'm concerned about the API query limit? Should I be?
Would really appreciate it if someone could point me in the right direction!
Thank you

Showing some markers and popups isn't really complicated with OpenStreetMap and OpenLayers:
simple OpenLayers marker example
dynamic markers from a database (example result)

Use google maps javascript v3 and make the required changes
Please refer
https://developers.google.com/maps/documentation/javascript/

The Google Maps API limit is something like 25k (or was it 250k?) per day - so unless the app you're making proves to be really popular, you won't have to worry about it

Related

SnapRoads - how to?

I've implemented a Google Location Api on my app to track my routes. I record my coordinates in a sqlite Db and then save these coordinates as a GPX file to see on map parsing and build via polylines.
There are a lot of points.
I see that unfortunately the position not seems follows the road even if I drive/walk in the middle of it.
Searching with google I've founded SnapToRoads as part of Google map API but, unfortunately not for Android, even if it seems that is possible to implements (but I don't know in which manner).
I wonder if someone knows how to solve this problem or some workarounds
At the end, I implemented SnapToRoad API to solve this problem, even if I have to use my key on source code (if I don't want implement a web site with Javascript)

possibility of a real time turn by turn guidance navigation app using MapQuest on Android?

I would like to create a navigation application, with mapquest sdk for android, that gives real time turn by turn directions using GPS after a route is created, like when you start a navigation on google maps on button press. Is it possible to implement the feature using just the mapquest sdk or would I require any other api.
Say if there was a possibility, then, is there a way to extract that guidance('turn left/right') cue and use it with in the program?
Yes, it is possible. I'm currently developing my Bachelor Thesis (a mobile navigation service) with the MapQuest API for Android. So as soon as I submitted it I can offer you the source code, too (will be in about a month). However, I can give you some help of course though.
Here is a nice tutorial from MapQuest of how to implement the route functionality. This is not a real time turn by turn guidance but gives you a first impression where to begin!
You can get all instructions from MapQuest here.
If you prefer another API to display the map this is not a problem as the guidance includes all shape points of the route. I chose the MapQuest API for this though as it is a bit easier to display the map for a first glance. However, I recommend you to draw the route yourself on the map though because the implemented method does not always work properly.
Hope I could help you with that and if you are willing to wait a month, I will post here the link to my GitHub repository with the source code.
Best,
Marius
EDIT:
So I submitted my work and can now give you access to my source code. You find my GitHub repository here.
I think the function getGuidance() in the NaviActivity will be a good starting point for your application. It calls the guidance information from MapQuest and converts the information into a JSONObject. The Route class then grabs the required information and sorts them in arrays.
I hope that this will help you with your application. For further questions do not hesitate to ask :)
Best,
Marius

How do I add markers to streets only - Android Development

After plenty of searching, I haven't yet found a solution that works for me and I'm really hoping someone here could help me. First I'll explain my problem, and then I'll mention some of the approaches I've attempted/considered so far.
Basically, I'm developing an Android app where markers randomly appear around the user's location. The catch is, the markers need to be placed on streets only.
I've been working with Google Maps Android API V2 but I'm trying to work around using anything with "limitations" such as 'geocoding'.
I've considered using different map API's such as Nutiteq but I've had some trouble implementing them. It would be nice to stick to Google since I've become familiar with it but I'm willing to try any suggestions you may have.
I have even considered loading up Google Maps API V3 in an html file so that I can use GDirections to load a path from one point to itself and then parse this data to Google Maps Android API V2 using JS but turns out GDirections has a limit as well.
Anyone have any idea how I can go about doing this? Even if the solution is hacky, it's still something.
I'm fairly new to Android Development.
Funny what you want to achieve. You don't need to load API V3 html. You can use directions api directly: http://maps.googleapis.com/maps/api/directions/json?origin=51,19&destination=51,19&sensor=false
It still has limitations, but is was like 2000 or something a day a device. And you don't want to put more than 2000 markers on single user's screen, do you?
This is easy to parse, for example with Gson.

Implementing Google Places API with updated Google maps v2

Over the past few days, I am trying to find a step - by - step tutorial to implement google places with the updated version of google maps (in eclipse for Android) with no success.
In the old tutorials I find , the map doesn't appear, because it is not updated in the v2.
Can anyone suggest a way to proceed? I feel lost with all the scattered information I get, and I don't have the experience to change the old examples by myself.
I want to make a simple app, that finds my current location and displays the cafes and restaurants, within 3Km distance. At this point I have tha map showing my location, and I need a tutorial to guide me into implementing Google Places from scratch.
Please help!
I'm actually making an app quite similar to yours! I haven't updated to v2 yet but from what I can tell, the only major difference in implementation is the use of a MapFragment as opposed to a MapActivity.
So you have the map up, yes? Then you should be able to make calls to Google Places the same way you did with the v1 Maps (since they're separate components and don't depend on each other). If Places is what's giving you trouble, I suggest following this tutorial: http://ddewaele.blogspot.com/2011/05/introducing-google-places-api.html. It's pretty good and only needs a couple of tweaks to get things up and running.
If you're still having trouble, post back and I might be able to help you out with some code.
i found this post helpful,i hope you will find it too,
http://mobile.tutsplus.com/tutorials/android/android-sdk-working-with-google-maps-map-setup/

How do you put pins on Google maps?

Is there a way to mark certain location on android google map like how you can put pins on iPhone apple maps and if so, can you show me or tell me how. I am new to android development and would really appreciate it.
Yes, you use a GeoPoint. Have a look at this tutorial for help on making a mapping app. TUTORIAL
Thankfully, putting a pointer on a map is fairly easy. Basically, you start with a very basic app. Instead of extending Activity, you extend MapActivity. You can then start the tutorial here to create a basic GUI.
Unfortunately, getting a map up and running takes a bit of work. Before you can even see a map, you need a Google Maps API key. It's explained in the documentation, but it can be a bit confusing. Here is a great tutorial explaining how to get an API key.
Once you have a key, you can fire up the example code from the tutorial. Make sure you have a data connection or else you won't see the map tiles. In addition, make sure you have internet permissions in your AndroidManifest.xml file. You also need to paste your new API key into your MapView XML code. The tutorial explains all of this quite nicely.
Once you have all that set up, it's easy enough to add a geographic coordinate to the map. I could explain it here, but Google does a good enough job on the subject. Follow their directions on how to create an ItemizedOverlay class. Then find the coordinates of your house or something and see it on the map.
Good luck!

Categories

Resources