Coder Social home page Coder Social logo

ionic-googlemaps-demo's Issues

BaseClass question

The result returned from geocode with an array as input is of type

mvcArray: BaseArrayClass<GeocoderResult>

When calling

mvcArray.on('insert_at') 

the ionicWrapper has this signature

    on(event: 'insert_at' | 'remove_at' | 'set_at' | 'finish'): Observable<any>;

so expecting an observable I subscribe, but that results in

Cannot read property 'subscribe' of undefined

Looking in BaseClass.js it looks like another signature is expected as the code is:

self.on = function(eventName, callback) {
  if (!eventName || !callback || typeof callback !== "function") {
    return;
  }

So it expects a callback function

about the decoder did it changed? because it doesn't return an ILatLng[] but a LatLng instead.

 let encodedPath: string = 'c{|xHbo|OSnFrSjW~M{EnFwVz@wy@vQsq@cBoUzJ{EzObBrIcLfE~C~H{Y~C~CfOgY{EjM{EgTcLzTsSwQcGf@IoKgJSkMsb@RkR' +
    'vVkRDon@SooBvBsXbGgE{@{EfE{EwLsXgEo{AcVgw@kRc|A_q@seAcLg@bBvQkCnKcGjCwQsSkM?cL{YjHrS{J~HgOwBgOjf@{Jj' +
    'u@cLjRcGz^oUjW{Tni@f@jRsIj\wBjf@sNbo@wG~iArDnlArIj\bGfr@bQf^~WrSnPvVfOjHnURzc@cQbQzc@nUrtAbBfYkC~M~H' +
    'nZ~Mz^f^_N~MrDbBwQkWsXR{E';

    let points: ILatLng[] = Encoding.decodePath(encodedPath);

Error in

The code for

/*****************************************************************************
 * LatLngBounds Class
 *****************************************************************************/
var LatLngBounds = function() {
    Object.defineProperty(this, "type", {
        value: "LatLngBounds",
        writable: false
    });

    var args = [];
    if (arguments.length === 1 &&
        typeof arguments[0] === "object" &&
        "push" in arguments[0]) {
        args = arguments[0];
    } else {
        args = Array.prototype.slice.call(arguments, 0);
    }
    for (var i = 0; i < args.length; i++) {
        if ("lat" in args[i] && "lng" in args[i]) {
            this.extend(args[i]);
        }
    }
};

fails if called like this

let latLngBounds = new LatLngBounds();

but works ok if called this way

let latLngBounds = new LatLngBounds([]);

The error:
vendor.js:1443 ERROR Error: Uncaught (in promise): TypeError: Cannot use 'in' operator to search for 'lat' in undefined
TypeError: Cannot use 'in' operator to search for 'lat' in undefined

BaseArrayClass

In the documentation there are 3 events

https://github.com/mapsplugin/cordova-plugin-googlemaps-doc/blob/master/v2.0.0/class/BaseArrayClass/README.md

In the Ionic Wrapper, there are 4 events:

on(event: 'insert_at' | 'remove_at' | 'set_at' | 'finish'): Observable<any>;

In the demo-code for native js, an event called 'error' is used

  mvcArray.on('error', function(error) {
    console.log(error);
  });
  mvcArray.on('insert_at', function(index) {

    // Get a result
    var geocodeResult = mvcArray.getAt(index);
    if (geocodeResult.length > 0) {

      latLngBounds.extend(geocodeResult[0].position);

      map.addMarker({
        'position': geocodeResult[0].position,
        'title':  JSON.stringify(geocodeResult)
      }, function(marker) {
        markers.push(marker);
      });
    } else {
      markers.push(null);
    }
  });

  mvcArray.on('finish', function() {
    isRunning = false;
  });

MAP_DRAG_EVENTS

I have added the following to verify that MAP_DRAP events are working in Ionic

      self.map1.setAllGesturesEnabled(true);
      self.map1.on(GoogleMapsEvent.MAP_DRAG_START)
        .subscribe(() => {
          console.log("--> map_canvas1 : map drag");
          resolve();
        });

but I never receive the event

Are there any known issues here ?

wf9a5m75 I need your help please

I am new to this and cannot find how to report an issue for 'https://github.com/mapsplugin/ionic-googlemaps-quickdemo-v4' which I am referring to.

I am receiving a blank white area where the maps should be displayed. I can still see the red border around where the map should be. I have been trying for hours and now have completely copy and pasted your code for the demo and it still does not work.

Here is a link to my repo: http://github.com/JamesSlater/app

The maps page is displayed on a modal from tapping the pin icon on the Contact page, to give you a bit of background.

I hope you have time to get back to me. Thanks in advance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.