-
10 Jul 2012 12:01 AM #1
Unanswered: Add markers to Ext.Map
Unanswered: Add markers to Ext.Map
Hi, I've a NestedList of locations divided by category.
At the last level I want to show in a map the points of locations in that level.
I've a tab panel in which I've two tabs: the first contain an Ext.NestedList, the second contains an Ext.Map.
I've already implemented the function that controls in which level I am; in that level I've already implemented a function to calcolate the user distance from the current location to the location for each element in that level of NestedList.
Next I try to add a point to the Map for that location in this way:
Code:var myLatlng = new google.maps.LatLng(lat, lon); var marker = new google.maps.Marker({ position: myLatlng, map: Ext.getCmp('mypoi').map });
Console doesn't show any errors but the marker isn't added to the map.
Where's the mistake?
-
11 Jul 2012 12:21 PM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,582
- Vote Rating
- 433
- Answers
- 3101
Are you doing this after the maprender event has fired on the Ext.Map?
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
16 Aug 2012 12:56 AM #3


Reply With Quote