0

I am trying to resize my map icon with scaledSize however the icon does not change, here is my code:

This works:

<marker icon="{resource.marker_circle}" class="marker-icon" id="{resource.id}" position="{resource.address}" title="{resource.name}" id="resource_clicked" value="{resource.id}" 

on-mouseover="showInfoWindow(event, '{resource.id}')">

But when I try to resize the icons, it does not work with scaledSize:

  <div class="map-container">
  <div style="margin: 0 auto; overflow:hidden; background: white;">
    <div style=" width: 100%; margin:center; height: 257px; border: none; border-radius: 25px;" map-lazy-load="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY">
      <ng-map ng-map-custom style="width: 100%;height: 100%;border: none; border-radius: 25px;" center="Santa Ana, CA" zoom="11">
        {!resources.filter('category_ref', _equals(my.category)).each(per_page: 30, page:response._page_44_resources_repeatingsection1) do |resource|}


        <marker icon="{url: resource.marker_circle, scaledSize:[32,40], origin: [0,0], anchor: [16,40]}" class="marker-icon" id="{resource.id}" position="{resource.address}" id="resource_clicked" value="{resource.id}"
        on-mouseover="showInfoWindow(event, '{resource.id}')"></marker>

        <info-window id="{resource.id}" max-width="300" style="display: none;">
          <div ng-non-bindable="">
            <div id="siteNotice"></div>
            <a href="" response-click="go">
              <h3 id="firstHeading" class="firstHeading">Location - # of Searches</h3>
            </a>
            <div id="bodyContent">
              <p>
                {resource.city}
              </p>
            </div>
          </div>
        </info-window>

        {!end}
      </ng-map>
    </div>
  </div>
</div>
Yrll
  • 1,619
  • 2
  • 5
  • 19
  • I tried using your code and scaledSize is working properly. It seems that there's also no syntax issue in your code as it is the same as in the [doc](https://github.com/allenhwkim/angularjs-google-maps/blob/master/testapp/marker_icon.html). Can you put your [minimal reproducible example](http://sscce.org/) in a sandbox? – Pagemag Dec 15 '21 at 06:34
  • Sure, my markers are the green circles, when I add scaled size it totally breaks my page. – Eric Garcia Dec 17 '21 at 20:41
  • https://www.chorusplatform.io/m/ocn/43 – Eric Garcia Dec 17 '21 at 20:41
  • I can see that your link shows the working map already however what the community needs is your full code that shows the issue that you are reporting so that we can check first hand the issue in your code. – Pagemag Dec 20 '21 at 23:27
  • Hi, Full code has been added above. – Eric Garcia Dec 21 '21 at 17:57

0 Answers0