ember-g-map | An ember-cli addon for integration with google maps | Addon library
kandi X-RAY | ember-g-map Summary
kandi X-RAY | ember-g-map Summary
An ember-cli addon for integration with google maps
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of ember-g-map
ember-g-map Key Features
ember-g-map Examples and Code Snippets
Community Discussions
Trending Discussions on ember-g-map
QUESTION
I'm building a web app that actually allow the user to see the marker for a selected a address. Also, I'm trying to build a feature that when a user drag the pin it should update the lat, lang value. Though I was able to get the current location of a user using the code below but the big question is How can I get the new lat, lang of the user whenever the user drags the pin anywhere
? Any response is much appreciated, thank you. Btw, I am using this addon https://github.com/asennikov/ember-g-map
/component.js
ANSWER
Answered 2019-Jul-23 at 14:42Ola @Mikelemuel, thank you for your question!
I have been able to solve your problem with a quick example application that I have created locally and I think part of the problem that you might be experiencing is that you are overloading getCurrentLocation()
to do too many things Let me explain...
Firstly I don't exactly understand what you're trying to do in your use case. I have made the assumption that because you're using the navigator.geolocation
functionality that you want the map to initialise with the current location of the user and then they should be able to drag the icon around to pick a more specific location. Because of this I have moved the navigator.geolocation
implementation to the init()
function of the component and simplified the onDrag implementation to take the passed-in attributes.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install ember-g-map
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page