19 Feb 2012 1:12 PM #1
Answered: Problem showing current location as a pin on Ext.map
I'm trying to show a map and then add a pin at the users current location. I'm using 'useCurrentLocation : true' so the map centres on the user's location just fine, however I can't add a pin correctly. I've attached a listener to Ext.map event 'maprender' but when I do map.geo.coords gives Null values for Lat and Long. It's as if the maprender event is fired before the location is determined. any suggestions? Is there a later event I can listen to?
Thanks in advance.
Listen for the locationupdate event on the GeoLocation instance
20 Feb 2012 5:30 AM #2
- Join Date
- Mar 2007
- Gainesville, FL
- Vote Rating
Listen for the locationupdate event on the GeoLocation instanceMitchell Simoens @SenchaMitch
Sencha Inc, Senior Software Engineer
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
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 email@example.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!
When posting code, please use BBCode's CODE tags.
22 Feb 2012 11:49 AM #3
Thanks so much! You are awesome!!!!
15 Jun 2012 10:24 AM #4
Hello. How did you solve this? I'm using Sencha Architect to build an app also showing the marker on the current location, but I just can't get it to work.
Here is my thread: