Skip to Content (Press Enter)
OutSystems.com
Personal Edition
Community
Support
Training
Training
Online Training
Developer Schools
Boot Camps
Certifications
Tech Talks
Documentation
Documentation
Overview
ODC
O11
Forums
Forge
Get Involved
Get Involved
Jobs
Ideas
Members
Mentorship
User Groups
Platform
Platform
ODC
O11
Search in OutSystems
Log in
Get Started
Back to Forums
Mykola (Nick) Tkachenko
493
Views
3
Comments
[Google Maps Web] Custom marker image not working
Question
Forge
Google Maps Web (O11)
Forge asset by
Labs
Hi,
I'm trying to add custom image to a map marker in base64 using in Marker Options
"
{
icon: {size: new google.maps.Size(220,220),
scaledSize: new google.maps.Size(32,32),
origin: new google.maps.Point(0,0),
url: ""data:image/png;base64," + BinaryToBase64(Picture) + """,
anchor: new google.maps.Point(16,16)}
}"
But marker in this case is not displayed at all.
I've tried to put manually JS form google maps api from this example https://jsfiddle.net/J7mf7/1/ and it worked fine. But I would like to use this component for this task as it is more reusable. Will apreciate any help.
Thank you.
Best regards,
Nick
Nuno Reis
MVP
I made it very easy by just following Google API examples.
I end up with an AddCoordinateMarkerToMap action with TriggeringEvent ="click" and Handler
"
{draggable: false, title: 'Name
'
, icon: 'img/Image.png'
}
"
Mykola (Nick) Tkachenko
The problem was in GenerateMarkerOptionsByPosition action that repleces } with , and appends coordinates value. And in case of nested options the worng } was replaced. So I've made small change to this action replacing { (that always first one) - see attached image.
Screen Shot 2016-04-28 at 12.09.08.png
Carlos Filipe Simões
Staff
Hey, Mykola,
Thank you for sharing! We'll update the component to allow you to pass these parameters without having to modify it.
Best regards,
Carlos Simões
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
See the full guidelines
Loading...