Home > DeveloperSection > Forums > Add markers to a Ext.Map in Sencha Touch
Alex Leblois
Alex Leblois

Total Post:67

Posted on    May-31-2013 2:05 AM

 Sencha Touch Sencha Touch 

 1 Reply(s)
 3073  View(s)
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,
                    icon: "point.png"

Thanks in advance! 


Total Post:604

Posted on    June-01-2013 12:40 AM

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:



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

Don't want to miss updates? Please click the below button!

Follow MindStick