Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to use custom markers?

Is it possible to use bespoke markers that do not resemble the "Hiro" marker like below. Could I potentially use a random shape (a solid red oval for example) as a marker?

If this is not currently supported, could someone point me into the right direction to where I might start building this functionality?

enter image description here

like image 426
Anthony Budd Avatar asked Aug 22 '17 14:08

Anthony Budd


People also ask

How do I install custom markers?

For adding a custom marker to Google Maps navigate to the app > res > drawable > Right-Click on it > New > Vector Assets and select the icon which we have to show on your Map. You can change the color according to our requirements. After creating this icon now we will move towards adding this marker to our Map.

What are Android markers?

Markers are objects of type Marker , and are added to the map with the GoogleMap. addMarker(markerOptions) method. Markers are designed to be interactive. They receive click events by default, and are often used with event listeners to bring up info windows.

How do I change the color of a marker on Google Maps?

To edit the marker color, click or tap on the marker icon. When you do that, you can change both the color of the marker and its style. Go for the color or style you want to change and then click OK to see the effect. Click on the button labeled Done to save your new marker color settings.


1 Answers

AR.js supports custom markers. Make any silly image with the marker generator.

Let ar.js know that you want to use your marker:

<a-marker type="pattern" url="patterns/mypattern.patt">
      <a-entity myobject></a-entity>
</a-marker>

and voila. You can check it out in this glitch using this image.

like image 133
Piotr Adam Milewski Avatar answered Oct 14 '22 11:10

Piotr Adam Milewski