SKMaps: How do I initialise a search using "SKAddressSearchSettings" class? - android

I am trying to include an address search inside my application developed in Eclipse using SKMaps (for Android). I believe I should be using the SKSearchManager but it does not specify any method that accepts SKAddressSearchSettings as an argument.
In the documentation it says that SKMultiSearchSettings can be used to search for a Country > City > Street but in does not have the required setter methods. The only one there is setSearchTerm() which does not seem to do the job.
Is this a genuine problem or is there some other way around it?

For the search to work you need to have the maps downloaded as the search only work with the "offline" maps: http://developer.skobbler.com/getting-started/android#sec019
This should also be the behaviour of the demo projects (http://developer.skobbler.com/support#download)
Once you download the map you should start getting back results. Note: you'll be searching through OSM data and that's (unfortunately) not the best when it comes to addressability)

Related

Google Places API - any way to enumerate the Place Types list?

My question is in the context of an Android app providing users with a way to add Places to the Google Places database. Regarding this page:
https://developers.google.com/places/supported_types
After extensive searching, I've been unable to find a way to retrieve these types from the API in a manner suitable for presentation to the user. Does anyone know a way to accomplish this, or is there a built-in dialog I can call (similar to the Place Picker)?
Thank you in advance.
I see this is old so you've likely worked around your issue by now. For the benefit of others, here's a work around since Google seems to have left us dangling on this one.
First, I've created a small data file having all of Google's constants (as of this posting date) associated with friendly names. The two values are separated by commas.
Here's a link to the file:
https://drive.google.com/open?id=0B_33r2IAzcMibndhT2RicWdLUXc
This file can be formatted in JSON if you wish, or read as is. Use it as a source for an AutoCompleteTextView DataAdapter, so the users can easily select a place type. I haven't written the code yet. My needs are different than yours so my code won't meet your needs, but it should be pretty easy to implement an AutoCompleteTextView with this data.

MapBox Find terrain class by coordinates in Android

I spent several hours looking for simple solution and still haven't found one.
MapBox style editor uses this simple feature. That you can hover and click over map, and it shows small popup stating all terrain classes you enabled in your map.
Question, how to do it in Android version of MapBox given I have installed my style. Now I want click on any place in the map and get the same popup stating, for example, that this is building, woods, background here. Or other place would satte, that this is major road.
This IS doable as MapBox studio itself shows. i can't believe it uses some API not available for anyone, as this is one API no map provider gives, while still able correctly draw terrain. What so complex to add this API?
And NO I am not interested in address. I am interested exactly on terrain, for simple task - distinguiosh water from non-water, road from non-road, building, from non-building, don't care where it is by address, so reverse geolocation does not work. Or simpler - I need SIMPLER geolocation, than address.
Your questions kind of confusing but I'll try and help. If I'm reading correctly, you are trying to create an Android app that uses an API similar to Mapbox Studio that allows the user to select/distinguish the difference between objects on the map such as buildings, water, forest, etc.
If this is the case, then first you must understand that Mapbox Studio is using OpenStreetMap data to distinguish between objects. These objects are stored in a database with tags. It's tough to explain so i'll just leave a brief reading wiki page that might help.
To my knowledge, there isn't any API's specific to Android that will give you the kind of information you're looking for. However, if I was in your dilemma I'd take a look at the Overpass API as it's a complex query tool that allows you to send coordinates to it and it will return all the tags (such as building or water) at that location within a JSON object. From there you can parse and use the data in your app. It is very powerful so I suggest reading up on how to use it and test using a website called Overpass Turbo, that's if you decide to use it.
Nevertheless, I hope this helps and I understood your question correctly.

How to use addressing and validation PostCodeAnywhere on Android?

I'm building an application that takes the departure and destination address from the user. The company purchased Capture+ from PostCode anyWhere to be used on our website, I now need to build it on Android.
I'm trying to build a layout that would have something like this demo
http://www.postcodeanywhere.co.uk/address-capture-software/try-it-now/
I tried to look for an Android API for that, but didn't find a Java API http://www.postcodeanywhere.co.uk/support/sample-code.aspx
This link shows how to get started with Capture+ , but again only javascript and some html form
https://www.postcodeanywhere.co.uk/address-capture-software/guide/default.aspx?reg=1
I've tried reading about the search dialog http://developer.android.com/guide/topics/search/search-dialog.html
But i'm not sure if it's the right thing, I'm really lost, can anyone help me please ?
I'm on the technical support team here at Postcode Anywhere. With the Capture+ function at the moment it can only be done with the JavaScript snippet provided in the integration process.
We do however have JAVA code samples for all our API calls which you can use to implement the more traditional 'Click to Find' method. All the APIs can be found here:
http://www.postcodeanywhere.co.uk/address-validation/api/
For the UK the APIs that you require are the 'Find' and the 'Retrieve By ID'.
No problem, good to hear you got it working.
The service is intended to be used in this two part method (Find and retrieve). The retrieve by ID is the call where the charge is made. There are restriction on how many 'Finds' that can be used when no 'Retrieves' are made.
If you want to drop me an email of your requirements I can have a look into the best way of doing it?
My email is tomm#postcodeanywhere.com
Cheers

Default search functionality google maps android

I want to get the default search functionality available in google maps on my android project.For example if i search "doctors in india" Gmaps will show many points, how can i get this work without using Itemized Overlay or by using some json request.Can somebody please suggest me an idea.
You could use Google Places API to get a JSON for your query.
If you are looking to avoid using any library or API (because you have to register to get the API key) you could just use a webview and put a maps.google url.
for example:
https://maps.google.com/?q=New+York&z=13&t=m&output=embed
or
https://maps.google.com/?q=near:doctors+in+india&z=13&t=m&output=embed
You will find that the parameters here are not documented ,Here is a link i found useful for the parameters.

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.

Categories

Resources