Map Widget problems

The place to discuss anything and everything about running your LiveCode on Android

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
AndyP
Posts: 614
Joined: Wed Aug 27, 2008 12:57 pm
Location: Seeheim, Germany (ex UK)
Contact:

Map Widget problems

Post by AndyP » Tue Apr 24, 2018 8:46 am

For my next presentation on LC Global, I have a working ISS tracker which uses a browser widget and javascript to display the ISS track and position which is working well.
I would like to also use the new Map widget as an alternative method but the widget always remains empty..no google map when built for Android.

I have :

Code: Select all

set the centerCoordinates of widget "Map" to "55.9533,-3.1883"
         
         set the region of widget "Map" to "55.9533,-3.1883, 10, 10"
         
         local tMarkers, tMarkerData
         put "55.9533,-3.1883" into tMarkerData["coordinates"]
         put "Centre of Edinburgh" into tMarkerData["title"]
         put tMarkerData into tMarkers["Edinburgh"]
         set the markers of widget "Map" to tMarkers
         
         
         -- draw some parallel lines over Scotland
         local tPolylines
         put "55.9533,-3.1883,55.8533,-3.1883" into tPolylines[1]["coordinates"]
         put "255,0,0" into tPolylines[1]["color"]
         put "5" into tPolylines[1]["width"]
         put "54.9533,-3.1883,54.8533,-3.1883" into tPolylines[2]["coordinates"]
         set the polylines of widget "Map" to tPolylines
as per the dictionary entries and added my Google auth 2 key to the Map widget inclusions which I have added manually to the build settings.

Does anyone have a working example or can see a problem with what I'm doing?
Andy Piddock
https://livecode1001.blogspot.com Built with LiveCode
https://github.com/AndyPiddock/TinyIDE Mini IDE alternative
https://github.com/AndyPiddock/Seth Editor color theming
http://livecodeshare.runrev.com/stack/897/ LiveCode-Multi-Search

okk
Posts: 176
Joined: Wed Feb 04, 2015 11:37 am

Re: Map Widget problems

Post by okk » Thu Aug 09, 2018 11:28 am

Hi Andy, did you get the Map Widget working finally? I just try to follow up all forum posts related to map widget. Best. Oliver

kaikuse
Posts: 18
Joined: Tue Dec 29, 2015 7:30 pm
Location: Maracaibo
Contact:

Re: Map Widget problems

Post by kaikuse » Thu Dec 27, 2018 10:33 pm

Hi @AndyP you're find a solution to the Map widget?

best regard

lilRalph
Posts: 25
Joined: Wed Aug 26, 2015 9:43 am

Re: Map Widget problems

Post by lilRalph » Sat Feb 13, 2021 4:12 am

As far as I am able to determine the addition of polylines onto the map widget still doesn't work.

I can add a marker, centre the map and zoom in but the application that I'm trying to build will import at gpx file and plot the path from that, except it doesn't.

Does anyone have this working in LC 9.6.0?

Is there an alternative?

I think I can do this in the browser widget with Javascript but that isn't anywhere near as elegant as using the map widget would be.

lilRalph
Posts: 25
Joined: Wed Aug 26, 2015 9:43 am

Re: Map Widget problems

Post by lilRalph » Sat Feb 13, 2021 2:02 pm

Re-reading the documentation it clearly states that the polylines function only works on Android which make it bloody hard to develop anything useful with this widget.

Web Browser and Javascript it is then.

Post Reply

Return to “Android Deployment”