ADD MARKERS TO A EXT.MAP IN SENCHA TOUCH

Alex Leblois

Total Post:67

Points:471
Posted by  Alex Leblois
 3155  View(s)
Ratings:
Rate this:
Hi Everyone!

I am trying to make an application which displays a map with your current location marker and several markers related to data from the server which location is closed to your current location. So far I can render the map, show the current location and get the data related to this location. The problem arise when I try to add markers about the location of this data. I´ve read through a lot of forums and pages but I found no solution. I use this piece of code to add markers (to try to add them ..):

var marker = new google.maps.Marker({
                    map: map._map,
                    position: new google.maps.LatLng(bookletMarker[i].location[1],bookletMarker[i].location[0]),
                    title : bookletMarker[i].title,
                    draggable:false,
                    icon: "point.png"
                });

Thanks in advance! 

  1. AVADHESH PATEL

    Post:604

    Points:4228
    Re: Add markers to a Ext.Map in Sencha Touch

    Hi Alex!

    You should be able to get the map instance from your map with getMap() and then add the pointer as described in the google maps api docs:

    marker.setMap(map);

    OR

    You can use map.getMap() to get the google map instance and use it when you create markers.

    It may be helpful for you.

      Modified On Jun-01-2013 12:44:21 AM

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!