Android Question Google Maps, working project?

Status
Not open for further replies.

Shay

Well-Known Member
Licensed User
Longtime User
Hi
Can someone post working project of Google maps,
This Library is different from all other that I know and it is hard for me to understand how to use it
(the initialize part is confusing)
Also the MapExtras examples are not working (even that I modify the mainfest)
(While Erel example is working - I still cannot understand how to work with this library)
Does anyone has working project while:
1. Getting current location (with and without GPS) (using google map location function)
2. Setting course from Point A to Point B

Also does anyone knows how to turn on client location feature automatically
(so I can get his location even if he did not enable it - I am talking about location via GSM)

Thanks
 

Beja

Expert
Licensed User
Longtime User
(so I can get his location even if he did not enable it - I am talking about location via GSM)
If you could get the lat/lon then you can send them by SMS to any phone.
 
Upvote 0

Shay

Well-Known Member
Licensed User
Longtime User
So how does all the driving app's works? are they using different google map API?
 
Upvote 0

Shay

Well-Known Member
Licensed User
Longtime User
Hi
I have few more questions:
1. Regarding route (from A to B) - do how can I do it such they do it in google maps.com (getting route + distance and time)
2. How can I automatically enable client location (not by GPS) in his phone so I can get his location by GSM
3. When I am using marker, and the title is in Hebrew the work is cut (Cannot see full word) same if using snippet
 
Upvote 0

warwound

Expert
Licensed User
Longtime User
Currently no routing api is wrapped to enable it to be used in b4a.

Take the Google Directions API as an example of a possible api to use.
You can do this in b4a without any additional library, you'd use HTTP or HttpUtils to make requests for directions and in that request specify the format of directions you require - JSON or XML.
Once you get the response to your request you'd parse it using b4a's JSON or XML parsing libraries.

There is a java library to enable use of the Google Directions API in a java application and this java library could be wrapped into a b4a library.

The results will be the same no matter which method you use to access the API.

You can use the API today in your b4a project if you make requests using the HTTP or HttpUtils library and parse the response using b4a's JSON or XML libraries.

Or you can wait for someone to create a wrapper for the java library - and for that you could be waiting a long while or forever :(.

The OSMBonusPack library offers a java library to request directions from Google Directions API, Mapquest's routing service or the OSRM routing service.
I see OSMBonusPack has been updated to enable offline routing using the android GraphHopper routing engine.

Obviously OSMBonusPack is designed to work with OSMDroid and not Google Maps but the OSMBonusPack classes that make and parse routing requests could (relatively easily) be modified to work with Google Maps.

I'll reply to you via a PM to continue the discussion about b4a routing libraries.

To obtain the user location without GPS requires some form of 'network location library', try searching the forum i'm sure b4a has at least one network location library available.

As for the problem with Hebrew text...
Is Hebrew a right to left language?
Is the problem caused by android not using a character set that that is capable of displaying Hebrew text?

Martin.
 
Upvote 0

Shay

Well-Known Member
Licensed User
Longtime User
The network location is google map is working great, my question is how to enable someone phone for this feature is off

yes Hebrew is from right to left (issue is - I can see Hebrew characters, but word is cut in the middle)

Can I calculate the distance from marker A to marker B?
 
Upvote 0

Shay

Well-Known Member
Licensed User
Longtime User
can I ask the user to enable the location service? (Can I id it is disabled?)
 
Upvote 0

Shay

Well-Known Member
Licensed User
Longtime User
1. How can I draw line from Googlemap1.MyLocation (which is automatically draw blue dot on map) to some other point on the map
2. Is it possible to change the blue dot to something else
3. Is it possible to draw arrow and not a line?
4. There is a circle around my location, how do I disable it?
 
Last edited:
Upvote 0

jamesnz

Active Member
Licensed User
Longtime User
Currently no routing api is wrapped to enable it to be used in b4a.

Take the Google Directions API as an example of a possible api to use.
You can do this in b4a without any additional library, you'd use HTTP or HttpUtils to make requests for directions and in that request specify the format of directions you require - JSON or XML.
Once you get the response to your request you'd parse it using b4a's JSON or XML parsing libraries.

There is a java library to enable use of the Google Directions API in a java application and this java library could be wrapped into a b4a library.

The results will be the same no matter which method you use to access the API.

You can use the API today in your b4a project if you make requests using the HTTP or HttpUtils library and parse the response using b4a's JSON or XML libraries.

Or you can wait for someone to create a wrapper for the java library - and for that you could be waiting a long while or forever :(.

The OSMBonusPack library offers a java library to request directions from Google Directions API, Mapquest's routing service or the OSRM routing service.
I see OSMBonusPack has been updated to enable offline routing using the android GraphHopper routing engine.

Obviously OSMBonusPack is designed to work with OSMDroid and not Google Maps but the OSMBonusPack classes that make and parse routing requests could (relatively easily) be modified to work with Google Maps.

I'll reply to you via a PM to continue the discussion about b4a routing libraries.

To obtain the user location without GPS requires some form of 'network location library', try searching the forum i'm sure b4a has at least one network location library available.

As for the problem with Hebrew text...
Is Hebrew a right to left language?
Is the problem caused by android not using a character set that that is capable of displaying Hebrew text?

Martin.
In 2019 the OSMbonuspack is out of date ( the http strings are for the old osrm/mapquest servers) , but the GraphHopper project is well supported now and supports offline routing for both ios and android. The java library seems to take http strings
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
... this thread is 5 years old and it is a mistake to post any new answer to this thread. You should create a new thread for your questions/issues
 
Upvote 0
Status
Not open for further replies.
Top