Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Drawing A Path Between Different Markers On Map
Started by ansaf_130 Mar 21 2013 04:57 AM

23 replies to this topic
mapview markers
[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

ansaf_130

[GLOBAL: userInfoPane.html]
ansaf_130
  • Enthusiast

  • 47 posts
  • Corona SDK

Is there a way to draw lines or more accurately a path between various markers on MapView like if someone want to show the different stays between his/her journey and the overall route??

 

thanks in Advance



[TOPIC: post.html]
#2

scalant23

[GLOBAL: userInfoPane.html]
scalant23
  • Observer

  • 1 posts
  • Corona SDK

I´d like to know it too. How I draw routes in maps with Corona then? Really Corona can´t draws routes in a map? I can´t believe it... I need do it... so I have to work with other SDK... :(



[TOPIC: post.html]
#3

ksan

[GLOBAL: userInfoPane.html]
ksan
  • Corona Geek

  • 2,795 posts
  • Corona SDK

I don't believe the built in map object is able to do something like this but I'd be very happy to be proven wrong. 



[TOPIC: post.html]
#4

stardustJerry

[GLOBAL: userInfoPane.html]
stardustJerry
  • Enthusiast

  • 63 posts
  • Corona SDK

I've been trying to find some way of drawing on a map and apparently there are no capabilities available. No overlays or ways of drawing a route.  If this is really true, are such capabilities available in the Enterprise version?  

 

Are they planned?



[TOPIC: post.html]
#5

d3mac123

[GLOBAL: userInfoPane.html]
d3mac123
  • Contributor

  • 248 posts
  • Corona SDK

I have the same situation here. My app needs a dashboard (which I can do with Corona) but also a map view showing the route taken. This is my problem. The API does not seem capable of doing it, neither I found a way to use the webview with Google Maps to draw it. Any ideas?



[TOPIC: post.html]
#6

nmichaud

[GLOBAL: userInfoPane.html]
nmichaud
  • Contributor

  • 492 posts
  • Corona SDK

Unfortunately, I can confirm that this is not possible. This is something we are also waiting for and even ask Gremlin Interactive for a new map view plugin. Our company would be ready to pay for a complete map plugin.



[TOPIC: post.html]
#7

stardustJerry

[GLOBAL: userInfoPane.html]
stardustJerry
  • Enthusiast

  • 63 posts
  • Corona SDK

Well,  you can do it with Google maps, writing javascript and html to address the Google Map API, and then running it in a webview.  And you can pass data back to Corona using stuff added to the URL.   It isn't pretty, but you can do it.  

 

If someone wants it I'll dig it up.



[TOPIC: post.html]
#8

d3mac123

[GLOBAL: userInfoPane.html]
d3mac123
  • Contributor

  • 248 posts
  • Corona SDK

I would check your findings for sure. I agree it is not the most beautiful way to use the maps in Corona but, at least, would be better than nothing :)



[TOPIC: post.html]
#9

nmichaud

[GLOBAL: userInfoPane.html]
nmichaud
  • Contributor

  • 492 posts
  • Corona SDK

From our experience, this is an avenue we have try in the past. Unfortunately with such a scheme, we were limited to what we can do. For example, changing the center of the map require to regenerate the whole html things. Quite slow and not the best user experience.



[TOPIC: post.html]
#10

stardustJerry

[GLOBAL: userInfoPane.html]
stardustJerry
  • Enthusiast

  • 63 posts
  • Corona SDK

I would check your findings for sure. I agree it is not the most beautiful way to use the maps in Corona but, at least, would be better than nothing :)

Ok, here is a dropbox link.  What you do is click draw on a map, then just click a few spots, say 3 or 4 (I think there is a limit), then save.

After that,  click on show saved area.  Then when the map shows again, just click once anywhere on the map and it will draw the saved lines that were send back from the corona code.  Best of luck. 

 

https://www.dropbox.com/sh/7zxy24zebrehhq6/AACbPXILC6qx5113rOv1GIE4a



[TOPIC: post.html]
#11

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,788 posts
  • Enterprise

Corona's Map object (native.newMap) is a native object.  It sits on top of the OpenGL canvas that the rest of your app is built upon.  All Corona drawing APIs like display.newLine() are part of the OpenGL canvas.  You therefore cannot draw on top of anything created with an API call that starts with native.*.

 

Rob



[TOPIC: post.html]
#12

ksan

[GLOBAL: userInfoPane.html]
ksan
  • Corona Geek

  • 2,795 posts
  • Corona SDK

The answer will be to have an updated mapView or a thirdparty plugin that does the same thing described above but in the native map environment. At the very least on Android which uses the same Google maps this should be very possible if you have access to native calls. I have no clue if Apple Maps support this yet. I sincerely hope that the mapView does get some love from Corona Labs sooner than later. One can only wish! :-)



[TOPIC: post.html]
#13

runewinse

[GLOBAL: userInfoPane.html]
runewinse
  • Contributor

  • 485 posts
  • Corona SDK

Yes, being able to actually do something with the maps would have been really, really useful.



[TOPIC: post.html]
#14

corona_pro

[GLOBAL: userInfoPane.html]
corona_pro
  • Enthusiast

  • 38 posts
  • Enterprise

Agree totally.  Looking forward to an enhanced version of map view.



[TOPIC: post.html]
#15

Gremlin Interactive

[GLOBAL: userInfoPane.html]
Gremlin Interactive
  • Contributor

  • 700 posts
  • Enterprise

We *might* be able to help out on this subject, but without resorting to making a new plugin for maps.

We will do some experimentation and let you guys know how we get on

[TOPIC: post.html]
#16

nmichaud

[GLOBAL: userInfoPane.html]
nmichaud
  • Contributor

  • 492 posts
  • Corona SDK

This is interesting, can't wait to see what you could do.



[TOPIC: post.html]
#17

Falcon777

[GLOBAL: userInfoPane.html]
Falcon777
  • Contributor

  • 406 posts
  • Corona SDK

We *might* be able to help out on this subject, but without resorting to making a new plugin for maps.

We will do some experimentation and let you guys know how we get on

 

Looking forward to that.  :)



[TOPIC: post.html]
#18

nmichaud

[GLOBAL: userInfoPane.html]
nmichaud
  • Contributor

  • 492 posts
  • Corona SDK

@Gremlin any progress you could share with us with your experimentation ?

 

thanks



[TOPIC: post.html]
#19

Gremlin Interactive

[GLOBAL: userInfoPane.html]
Gremlin Interactive
  • Contributor

  • 700 posts
  • Enterprise

@Gremlin any progress you could share with us with your experimentation ?

 

thanks

 

Haven't got to it just yet, but it's still on the task list.

I'll update when I have some news.

Cheers



[TOPIC: post.html]
#20

pspk

[GLOBAL: userInfoPane.html]
pspk
  • Observer

  • 15 posts
  • Corona SDK

@Gremlin, any updates you can share with us on this topic?



[TOPIC: post.html]
#21

Mars Interactive

[GLOBAL: userInfoPane.html]
Mars Interactive
  • Contributor

  • 177 posts
  • Corona SDK

gremlin, +1 to that, thnx !



[TOPIC: post.html]
#22

alzaabi98

[GLOBAL: userInfoPane.html]
alzaabi98
  • Contributor

  • 354 posts
  • Corona SDK

Hi .. this will be great ability if you can help ..

thx



[TOPIC: post.html]
#23

davidshi.x

[GLOBAL: userInfoPane.html]
davidshi.x
  • Observer

  • 3 posts
  • Corona SDK

I was reading through the documentation right now, and noticed the same thing with lines between map markers... Are there any updates for drawing lines in google maps?
 



[TOPIC: post.html]
#24

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,788 posts
  • Enterprise

Corona SDK does not support drawing on our native.newMapView() API.  At this time we do not plan on providing this. Our map feature is designed for adding simple map features for your app. If maps are the main feature or a major feature of your app, perhaps you should consider either using Corona Enterprise or CoronaCards where you have native access and can call your operating system's map features.

 

Rob




[topic_controls]
[/topic_controls]