LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
JereMiami
- Posts: 119
- Joined: Mon Nov 03, 2014 12:17 am
Post
by JereMiami » Wed May 12, 2021 4:09 pm
I recall that we may be able to change the icons in the map widget from the traditional red marker to something else. I may be remembering wrong. I look at the "markers" command for the full array and get this in the LC Dictionary:
The marker array has the following form: { : { "title":
It appears to be missing some text. Anyone know the full list of keys for the array or more to the point if we are able to change the icons, for instance, into a beach umbrella or hamburger type icon?
-
jameshale
- VIP Livecode Opensource Backer
- Posts: 474
- Joined: Thu Sep 04, 2008 6:23 am
- Location: Melbourne Australia
Post
by jameshale » Thu May 13, 2021 1:27 am
This is the rest of the text..9as far as I can tell…
The marker array has the following form: { tag for marker: { "title": title of the marker, "subtitle": optional subtitle of the marker, "coordinates": coordinates of the marker }, tag for marker: { ... }, ... }
-
JereMiami
- Posts: 119
- Joined: Mon Nov 03, 2014 12:17 am
Post
by JereMiami » Thu May 13, 2021 1:29 pm
Thanks! I'll have a look at it and be back.
-
JereMiami
- Posts: 119
- Joined: Mon Nov 03, 2014 12:17 am
Post
by JereMiami » Thu May 13, 2021 4:59 pm
For some reason, I cannot get anything but the markers to show up. No "title" description, just the red marker.
Code: Select all
on openCard
wait .5 seconds
set the region of widget "map" to gCoordinates & "," & ".005,.005"
wait 2 seconds
set the showsUserLocation of widget "Map" to true
put gCoordinates into tMarkers[1]["coordinates"]
put "Test" into tMarkers[1]["title"]
set the markers of widget "map" to tMarkers
end openCard
Why just the red marker and no title?
-
jacque
- VIP Livecode Opensource Backer
- Posts: 7230
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
-
Contact:
Post
by jacque » Thu May 13, 2021 5:32 pm
You can set the shape of the markers with the markerPoints property. The dictionary tells you how. You can create some elaborate markers this way. Bernd sent me an example years ago where each marker spelled my name, which was both impressive and funny.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
-
JereMiami
- Posts: 119
- Joined: Mon Nov 03, 2014 12:17 am
Post
by JereMiami » Thu May 13, 2021 5:44 pm
Nice- I am going to dig into it now that I know it is possible. Right now, I am stuck on getting any of the information in the markers array to show, particularly ["title"] and ["subtitle"] for whatever reason. The traditional red marker is in the right coordinates though.
-
jameshale
- VIP Livecode Opensource Backer
- Posts: 474
- Joined: Thu Sep 04, 2008 6:23 am
- Location: Melbourne Australia
Post
by jameshale » Fri May 14, 2021 1:23 am
Haven’t used them myself just had access to full dictionary entry
-
jacque
- VIP Livecode Opensource Backer
- Posts: 7230
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
-
Contact:
Post
by jacque » Fri May 14, 2021 5:08 am
JereMiami wrote: ↑Thu May 13, 2021 5:44 pm
Nice- I am going to dig into it now that I know it is possible. Right now, I am stuck on getting any of the information in the markers array to show, particularly ["title"] and ["subtitle"] for whatever reason. The traditional red marker is in the right coordinates though.
I'm afraid I misinformed you. MarkerPoints works with graphic objects. I missed the part where you said you were working with the map widget. I don't see a way to change the shape of those.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
-
JereMiami
- Posts: 119
- Joined: Mon Nov 03, 2014 12:17 am
Post
by JereMiami » Fri May 14, 2021 11:30 am
No worries. Let's try a different avenue. Is there any way to get the htmlText of the map widget, like you obviously can for the browser widget?
Something like for the map widget:
Code: Select all
on mouseUp
put the htmlText of widget "map" into fld "url"
end mouseUp
Clearly, it's not that easy for the map widget, but there must be some way to get the html of the map widget, no?