angular-google-maps icon indicating copy to clipboard operation
angular-google-maps copied to clipboard

Custom Markers

Open alfredoperez opened this issue 10 years ago • 14 comments

It will be nice to be able to create custom markers.... https://developers.google.com/maps/tutorials/customizing/custom-markers

alfredoperez avatar Feb 12 '16 13:02 alfredoperez

@SebastianM You can define a custom via a custom URL like this:

<sebm-google-map-marker [iconUrl]="'http://example.com/icon.png'">
</sebm-google-map-marker>

abmnukmr avatar Dec 05 '16 18:12 abmnukmr

Is there a way to use custom icon fonts rather than png files - like these http://map-icons.com/ ?

bholben avatar Dec 19 '16 21:12 bholben

can we define icon based on local path from our /assets/images/ path for example instead of an actual httpurl type?

TaiPhamD avatar Jan 03 '17 01:01 TaiPhamD

@rushstrike Sure. Just make sure the path is relative to your index.html file, i.e. iconUrl="assets/images/marker.jpg"

bholben avatar Jan 03 '17 05:01 bholben

Is it possible to insert some marker options like size?

JanCizmar avatar Apr 20 '17 05:04 JanCizmar

Yes, I think it could be a good thing to add height and width to the markers. It would be useful to be able to adapt the size of the markers to the size of the screen, like on smartphones.

Gaetane avatar Apr 21 '17 09:04 Gaetane

I have an issue, when i trie to customise the marker with [iconUrl] directive it goes hidden <sebm-google-map-marker [iconUrl]="'car.png'">

note : the png file is in the same folder as the html file

khzemni avatar May 09 '17 15:05 khzemni

The same folder as the html file is not correct path. Try to open the developer tools > network tab in your browser and search for the location where the browser is looking for the .png file. Probably it should be located somewhere in the root of you application or in the assets or images folder.

JanCizmar avatar May 09 '17 15:05 JanCizmar

thanks :D

khzemni avatar May 09 '17 16:05 khzemni

Is it now possible to add size?

bkbaheti avatar Jan 10 '18 16:01 bkbaheti

https://github.com/SebastianM/angular-google-maps/issues/517 works for me

fabrizziocht avatar Mar 10 '18 05:03 fabrizziocht

Is there a possibility to customize that image icon used as a Marker with CSS ?

amritofficial avatar Mar 10 '18 21:03 amritofficial

@bholben Is this possible now? "Is there a way to use custom icon fonts rather than png files - like these http://map-icons.com/ ?"

devpato avatar Apr 09 '18 01:04 devpato

No the custom image icons like we have an ability to do in Javascript Maps. Like this for instance https://www.google.ca/search?q=custom+marker+google+maps&rlz=1C1CHZL_enCA749CA749&source=lnms&tbm=isch&sa=X&ved=0ahUKEwiPpPiolq3aAhXQ7VMKHd1hC2sQ_AUICigB&biw=1536&bih=759#imgrc=crauu15YlnsVLM:

amritofficial avatar Apr 09 '18 12:04 amritofficial