How to add custom places in Google Places? - android

I have an android app that displays markers on map when we select from a list of type of places from Google Places. But I want to add my own data onto the map,other than the places in Google Places, given known lang and long. I don't want to use javascript. Is there a way to do this?

Yes, you can display your own data in a couple of different ways natively on Android. You can put down a marker at the point of interest with a custom info window. Here's a tutorial. You could also use an overlay, like a ground overlay, to show your info directly on the map. This method can either use pre-made images, or you can create your own bitmaps at runtime.

Related

Android application with maps and custom places

I want to make and Android app which has a map and a list of nearest custom places. By custom I mean places which may be not present in Google Places. What is the best way to do this?
At first I thought that Google Maps and Google Places List can be a good idea but I didn't like API keys (but if there is no other way I will deal with them) and I didn't quite understood the Adding Place part. How many Places can I add?
Are there any other services I can read about?
I believe that I don't have to implement nearest place search myself as it is a common task, I think.
If.. "by custom you mean places which may be not present in Google Places", then there should be no point in using the Google Places List (I assume you are talking about the Auto complete.) even if you like the API keys....
I think you should do handle and show your custom places outside of the Google Maps API logic. Like, create your custom list view somewhere outside of the Maps view, or overlay on top of it.

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.

How to let Android users search for closest points of interest created by me on Google Maps?

I want to mark historical 'points of interest' across the globe on a mapping solution such as Google Maps (or something else).
I'll be getting an Android app created in which I want to be able to provide the users the ability to search for and locate the nearest such 'point of interests' around their current location.
Should I be using Google Maps or something else like OSM?
How should I be marking them on Google or elsewhere?
(a) I want to be able to mark these places with pictures as well and
(b) I want to store them at my end in a generic format as well, just in case!
How should the Android app search for the closest such points?
As I understand, Google Maps can show its own map overlaid with my data when I provide a KML file (http://code.google.com/apis/kml/documentation/kmlSearch.html). Can that be shown "within an Android app"? (ie, I know it can be shown on a webpage, but can it be shown in a native app?)
I will suggest google maps. Reason is google maps is updated often and part
of the maps from osm is not as latest.
Probably store this marking in your own datastore called point_of_interest.
The info window is also a special kind of overlay for displaying content
(usually text or images) within a popup balloon on top of a map at a given
location. read here for more information.
your android app should detect current user location and send the information
such as latitude and longitude to your server. Hence the query to search
for point of interest is done by the server and process the data and send
back to user android app. For example, the query would be something like
select * from point_of_interest where distance < 10km limit 5;
yes, read this link
Ok, for an app I built for a customer, we had a similar requirement. Basically, I needed to display the locations of interest withing 200miles of my current location. The way this worked for me was that I took my current location and made a Web Services call to their servers where they did the Geographic calculation and returned a list of results to me.
I would have the Android app just use the MapView and then user Overlays to display icons on the map. The problem with displaying the items using kml is that they will not be clickable by the user so their will be no interactivity. If you do choose to do it with kml, there is some example code located in this project: https://github.com/sunlightlabs/congress
I prefer google maps. Google maps SDK looks good and the sdk performs well. I don't know a SDK that has something like a OSMMapView that offers the same performance and features like google maps does (please correct me). But OSM can be as visual appealing as google maps. Cloudmade has tons of different styles for OSM data.
If you want to display maps by google, you have to use the Maps Library that ships with the Android SDK.
You can display any Views on top of the google maps. I.e. use mapviewballoons on github.
If you have lots of POIs that you want to display you should definitely persist you data with a spatial index. So that nearest neighbour searches are fast. One solution would be to use sqlite R*Trees. I did not use them on android and they work not out of the box you have to build sqlite-android yourself (see this question). Or use Perst, or ...
If you have few data, that fits into the phone memory you can use a Quadtree. This would be even faster than the db when searching it. You will find lots of examples when you google it. You could store the data as xml, json or even serialize the whole quadtree with the java Serializable interface.
There are tons of possibillities this question is way too broad. Some random ideas:
Create a server that responds to bounding box searches over HTTP and store the POIs in a Quadtree.
Deliver all your POIs with the app. As database, xml, json or a serialized Quadtree.
I don't have experience with kml on Android.

Adding business information to an overlay in a MapView

On the Google maps web interface if you zoom in enough you can see businesses that are clickable. When you click the business you get the a speach bubble with a brief description of the business.
Even on the native android Google map you can tap businesses and get a link to the business information.
My question is that within a MapView is it possible to add my own overlay that when tapped loads the business info of a pre existant business? Is it possible to associate my overlay with a business in some way. I imagine that I could do this if I duplicated the html found on the google map in some way into my overlay, but I was hoping to avoid this.
In the past I have used this. https://github.com/jgilfelt/android-mapviewballoons Not sure how to pull info though.
My question is that within a MapView is it possible to add my own overlay that when tapped loads the business info of a pre existant business?
Assuming you find a source for the data, sure.
I imagine that I could do this if I duplicated the html found on the google map in some way into my overlay, but I was hoping to avoid this.
I highly doubt that will work.
First, you must find a Web service or something that has the data you seek. Then, you need to license that data. Then, you need to figure out how you want to render that data on the map overlay. The first two of those steps are the tricky ones.

Using pre-defined overlays in Google map

well i was able to find loads of information on how to create my own custom overlays onto the map, but none on how can i use the ones that google already has put on.
I basically want to use all the overlays of one type (say the Hotel overlay icons) and get their geoPoints and then use them in any way i want...right now i have to manually get the geoPoint of every such hotel overlay and then use them, which is pretty painful considering google has already marked them out...but i have no idea how can i use them..
Any idea how can i do this?
Those are not available to Android SDK developers -- they are part of the proprietary Google Maps application. The only pre-built overlay available to SDK developers is MyLocationOverlay.

Categories

Resources