Custom Map Markers With Buttons!

If you have the lat, long numbers you can center the map on that point and if the marker is there it will be centered.  But you won’t get the speech bubble with the title and subtitle without tapping on the marker.

@Rob Miracle

thanks, is there any way to show speech bubble without tapping?

there are so many markers on the map, so it’s so difficult to tap on them if there is no bubble show up automatically.

anyway, any suggestion?

Not that I’m aware of.  This could be a good feature.  Please suggest it at http://feedback.coronalabs.com

Just saw this post, referred by the “From the Forum” blog entry and wanted to say thanks to TandG for expanding on my old Code Exchange submission! Awesome to see it got some use (and some under-the-hood improvements!)

@TandG, taking the thread back to your code… I was wondering if you have made any further progress. Can you kindly let us know if you have any additional insight? Thank you very much!!!

Hey Ksan,

Unfortunately i haven’t made any changes to the code in quite a while… 

The above HTML code wasn’t quick enough for the purposes we needed, so we shifted our efforts onto making some Enterprise maps that did. Hopefully i’ll have some time to see if this can be expanded further in the future!

Thanks,

Jamie

Hi Jamie, 

Thanks for your response. How has your experience been with the Enterprise option? I assume you are using the native map object/services exposed to you by the underlying OS.

While looking at various options I came across a service called MapBox.com. They are used by a number of big names in the industry and do offer a REST API. A little expensive but interesting nonetheless. I was thinking about trying their service using REST API and webViews in Corona SDK. Just an idea at this stage. 

Regards & thanks,

Kerem

Just saw this post, referred by the “From the Forum” blog entry and wanted to say thanks to TandG for expanding on my old Code Exchange submission! Awesome to see it got some use (and some under-the-hood improvements!)

Hi Jamie, 

Still persevering with the CL implementation of the mapView but can’t help wondering what can be achieved with an Enterprise license and access to native calls.

How hard was it for you to bridge the gap using Enterprise and native calls? Would you be interested in marketing your map component (ie plugin) to other Enterprise license holders? Too bad the plugin market is not live yet and we can’t as Pro users take advantage of progress you make using the native calls but hopefully that day will come. 

Meanwhile any screenshots etc to whet the appetites would be so much appreciated. 

Thank you very much. Regards,

Kerem

Hi Kerem,

It wasn’t too bad bridging the gap, but i highly doubt we’ve done it the most optimal way. There was also a few head scratchers as we don’t use native code but we got there in the end! We’ve stayed away from selling the code on for that main reason, a native coder could probably make something much better and more useable. Ours works for the purposes we require, but it’s not something we can easily package. 

The most noticeable difference going the Enterprise route for us is the speed of the native Android maps. Its leaps and bounds faster than the current map view offered in the native.newMapView() cal, the ability to add buttons on to your marker popup boxes is particularly helpful as well. 

In a few large apps we’ve done the map view has to load 500-700 map markers at a time. Trying that with Coronas current implementation on Android just doesn’t work, the whole app grinds to a halt. Doing it with native maps is fine, theres some slight lag while the markers appear but thats it!

Unfortunately i can’t post screenshots of those apps as their white label and published under a marketing company, but hopefully the above explanation helps :slight_smile:

Thanks,

Jamie

Hi Jamie, 

Thank you very much for taking the time to respond in detail. Much appreciated. I will consider your experience in making a decision eventually. I’m trying to stick with the Pro subscription that I have in the hope that the Plugin Market will come along sooner or later and allow us to engage willing and able devs to make plugins for us. The map solution would be a perfect example for the viability of this model. 

Glad you managed to make it work for you. I’m just not that confident of my native coding skills… yet…

Best regards,

Kerem

@TandG, taking the thread back to your code… I was wondering if you have made any further progress. Can you kindly let us know if you have any additional insight? Thank you very much!!!

Hey Ksan,

Unfortunately i haven’t made any changes to the code in quite a while… 

The above HTML code wasn’t quick enough for the purposes we needed, so we shifted our efforts onto making some Enterprise maps that did. Hopefully i’ll have some time to see if this can be expanded further in the future!

Thanks,

Jamie

Hi Jamie, 

Thanks for your response. How has your experience been with the Enterprise option? I assume you are using the native map object/services exposed to you by the underlying OS.

While looking at various options I came across a service called MapBox.com. They are used by a number of big names in the industry and do offer a REST API. A little expensive but interesting nonetheless. I was thinking about trying their service using REST API and webViews in Corona SDK. Just an idea at this stage. 

Regards & thanks,

Kerem

Hi Jamie, 

Still persevering with the CL implementation of the mapView but can’t help wondering what can be achieved with an Enterprise license and access to native calls.

How hard was it for you to bridge the gap using Enterprise and native calls? Would you be interested in marketing your map component (ie plugin) to other Enterprise license holders? Too bad the plugin market is not live yet and we can’t as Pro users take advantage of progress you make using the native calls but hopefully that day will come. 

Meanwhile any screenshots etc to whet the appetites would be so much appreciated. 

Thank you very much. Regards,

Kerem

Hi Kerem,

It wasn’t too bad bridging the gap, but i highly doubt we’ve done it the most optimal way. There was also a few head scratchers as we don’t use native code but we got there in the end! We’ve stayed away from selling the code on for that main reason, a native coder could probably make something much better and more useable. Ours works for the purposes we require, but it’s not something we can easily package. 

The most noticeable difference going the Enterprise route for us is the speed of the native Android maps. Its leaps and bounds faster than the current map view offered in the native.newMapView() cal, the ability to add buttons on to your marker popup boxes is particularly helpful as well. 

In a few large apps we’ve done the map view has to load 500-700 map markers at a time. Trying that with Coronas current implementation on Android just doesn’t work, the whole app grinds to a halt. Doing it with native maps is fine, theres some slight lag while the markers appear but thats it!

Unfortunately i can’t post screenshots of those apps as their white label and published under a marketing company, but hopefully the above explanation helps :slight_smile:

Thanks,

Jamie

Hi Jamie, 

Thank you very much for taking the time to respond in detail. Much appreciated. I will consider your experience in making a decision eventually. I’m trying to stick with the Pro subscription that I have in the hope that the Plugin Market will come along sooner or later and allow us to engage willing and able devs to make plugins for us. The map solution would be a perfect example for the viability of this model. 

Glad you managed to make it work for you. I’m just not that confident of my native coding skills… yet…

Best regards,

Kerem

Great Maps, I’m trying to add multiple map positions with xml, but with no success, any idea?
 

mapOptions = { language = "", --Localise your map, Try "ja" for japanese. zoomLevel = 11, --The maps zoom level. Set lower for a more zoomed out view disableDefaultUI = "true", --Set to false to see the zoom controls etc draggable = "true", --Allow it to be dragged or not... zoomAllowed = "true", --Allow the user to zoom in or not.. bouncingPins = "false", --Plays the bounce animation when a pin is touched, setting a timer to stop the bounce doens't seem to be working right now... mapTypeId = "ROADMAP", --This can be ROADMAP, SATELLITE, HYBRID or TERRAIN showStyling = "false", --Set this to true to show a styled map, you can edit how it looks in the "styleArray" in the mapString code block (advanced) lat = userLocationTable.latitude, --Latitude of the starting point lon = userLocationTable.longitude, --Longitude of the starting point htmlFile = "map.html", --This is the name of the HTML file we create, its made in the DocumentsDirectory. markers = { --The markers we want on the map for i=1,#place do var\_lat = tonumber(place[i].child[2].value) var\_lon = tonumber(place[i].child[3].value) { name = "", lat = var\_lat, lon = var\_lon, url = 0, notes = "", markerImage = "http://www.tandgapps.co.uk/wp-content/uploads/2013/09/locationMarker.png", markerImageSize = {30, 30}, infoBoxOffset = {-140, 0}, --Not needed in this case as its userLocation, but it needs to be here anyway. } end }, }

Great Maps, I’m trying to add multiple map positions with xml, but with no success, any idea?
 

mapOptions = { language = "", --Localise your map, Try "ja" for japanese. zoomLevel = 11, --The maps zoom level. Set lower for a more zoomed out view disableDefaultUI = "true", --Set to false to see the zoom controls etc draggable = "true", --Allow it to be dragged or not... zoomAllowed = "true", --Allow the user to zoom in or not.. bouncingPins = "false", --Plays the bounce animation when a pin is touched, setting a timer to stop the bounce doens't seem to be working right now... mapTypeId = "ROADMAP", --This can be ROADMAP, SATELLITE, HYBRID or TERRAIN showStyling = "false", --Set this to true to show a styled map, you can edit how it looks in the "styleArray" in the mapString code block (advanced) lat = userLocationTable.latitude, --Latitude of the starting point lon = userLocationTable.longitude, --Longitude of the starting point htmlFile = "map.html", --This is the name of the HTML file we create, its made in the DocumentsDirectory. markers = { --The markers we want on the map for i=1,#place do var\_lat = tonumber(place[i].child[2].value) var\_lon = tonumber(place[i].child[3].value) { name = "", lat = var\_lat, lon = var\_lon, url = 0, notes = "", markerImage = "http://www.tandgapps.co.uk/wp-content/uploads/2013/09/locationMarker.png", markerImageSize = {30, 30}, infoBoxOffset = {-140, 0}, --Not needed in this case as its userLocation, but it needs to be here anyway. } end }, }