Thomas Chirwa
Thomas Chirwa

Reputation: 341

Custom markers - Google App maker

I am trying to display a custom marker on the map in App maker but unfortunately, I am unable to do so,

previously I was able to achieve this simply by

var marker = new google.maps.Marker({

position:{lat:, lng:},
map:map,
icon: url

});

please assist

Upvotes: 0

Views: 173

Answers (1)

The Support Group
The Support Group

Reputation: 343

If you use a Google Map widget, you can set those properties like so:

var map = app.pages.GmapCanvase.descendants.MapDiv;
map.mapType = 'roadmap';
map.zoom = 16;
map.latitude = -33.91722;
map.longitude = 151.23064;
var marker = map.getAddressMarkerJs();
marker.setIcon(url);

Upvotes: 1

Related Questions