Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 48980

Load Google Maps Marker from assets folder

$
0
0

Hello,

I load from here:
https://cdn.mapmarker.io/api/v1/pin?size=42&background=%2368BC00&icon=fa-circle&color=%23FFFFFF&

my marker.

But sometimes the map display no markers and sometimes he display the original marker and remove quickly after displaying.

I guess its because loading from web.

How could I load it from assets folder?

my code there is:

        if (timeFrom1.isValid() && timeTo1.isValid()) {
          if (timeStamp.isBetween(timeFrom1, timeTo1) || timeStamp.isSame(timeFrom1) || timeStamp.isSame(timeTo1)) {
            openState = 'geöffnet';
            filterState = 'nowOpen';
            color = 'primary';
            marker = 'https://cdn.mapmarker.io/api/v1/pin?size=42&background=%2368BC00&icon=fa-circle&color=%23FFFFFF&';
            return false;
          } else {
            if (timeStamp.isBefore(timeTo1)) {
              openState = timeFrom1.from(timeStamp);
              filterState = 'todayOpen';
              color = 'warning';
              marker = 'https://cdn.mapmarker.io/api/v1/pin?size=42&background=%23FB9E00&icon=fa-circle&color=%23FFFFFF';
            }
          }
        };

and in another method:

if (add) {
          markerPoints.push({
            position: {
              lat: data.position.lat,
              lng: data.position.lng
            },
            name: data.name,
            address: data.address.zip + ' ' + data.address.city,
            id: data.id,
            icon: data.marker
          });
        }

Thank you!

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 48980

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>