Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

How to integrate and make MapView of corona to have like SearchBox on Google Map?
Started by mekaingan Apr 17 2017 05:47 PM

3 replies to this topic
gps mapview searchbox googlemap prediction
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

mekaingan

[GLOBAL: userInfoPane.html]
mekaingan
  • Observer

  • 5 posts
  • Corona SDK

Hello, I'm developing a navigation application using the Corona SDK MapView.
 
The plan, when the Map successfully loaded, I will bring up a TextField with corona, to accommodate input of locations name which user can type.
 
Is there a way to connect the corona MapView in order to display the text field names like SearchBox prediction location on Google Map?


[TOPIC: post.html]
#2

agramonte

[GLOBAL: userInfoPane.html]
agramonte
  • Contributor

  • 824 posts
  • Corona SDK

Sadly the corona mapview controller is very limiting. Last time I checked you can't even get the location center of the map if you move it around. I don't believe what you are asking is currently possible. 



[TOPIC: post.html]
#3

SGS

[GLOBAL: userInfoPane.html]
SGS
  • Corona Geek

  • 1,878 posts
  • Corona SDK

why wouldn't a user just use Google maps for this?



[TOPIC: post.html]
#4

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 24,838 posts
  • Corona Staff

If you are wanting to plot pin points on a map, you can certainly do this with our native.newMapView, but there's not magic connection. you have to take in the address you want using your native.newTextField. Then you take that address and send it to a geocoding service that will take an address and give you a latitude/longitude value. Then with the lat, long, you can then call our API to place the pins on the map.

 

After that we don't have a way to draw any lines on the mapView. We also don't have any API's to generate turn-by-turn directions. I'm sure there is some service that provides it for you.

 

Rob




[topic_controls]
[/topic_controls]