Comments (3)
@lukashlobil
I have google maps by dapriett integrated with adding multiple markers.
Dragging markers would be an easy example as well.
By "getting tapped location" do you just mean latitude/longitude or the Address (with GeoCoding API)?
By "typing in address and have that location shown selected on the map" Is the address you want to be "selected" a marker which has this address or lat/long combination? Or is it more like type in address and zoom there in the map?
from nativescript-snacks.
I have just implemented a solution with dapriett's plugin as well. Just starting on draggable markers.
getting tapped location - If I get lat and lng, I can get the address easily, but for the demo purpose, it would be best if we showed the whole process of getting the address as well.
selected address - should add a marker and zoom in on it? Basically for the demo, it should showcase the plugin's capabilities.
I forgot to mention I am looking for a solution in Angular.
How do you get tapped location?
<MapView (coordinateTapped)=onMapTap($args)>
?
from nativescript-snacks.
I have the map implemented in Angular
For the tapped location:
Add (coordinateTapped)="onCoordinateTapped($event)"
to the MapView layout like this
In your .ts file
onCoordinateTapped(event) { console.log("Coordinate Tapped, Lat: " + event.position.latitude + ", Lon: " + event.position.longitude, event); // Do whatever you want here with the lat/long }
That's it to get the tapped location (I didn't try it out, just looked at the plugins code and demo app). In order to get the address you'd now need geocoding which requires some setup regarding apiKey (it's very easy to get the address after you've setup that). I haven't looked into that now, but I guess you can use a simple http request to access the geocoding api or use the in-built ones from android/iOS (which requires a bit more work I think)
For the address search you'd then need to again use geocoding to convert the address to lat/long and then it's an easy task again to add a marker there and zoom in.
Ps; If you still need a video tutorial, I can make one, but not before christmas as I won't find time before
from nativescript-snacks.
Related Issues (20)
- ipad style popover HOT 4
- Playing around nested containers HOT 1
- Splash Screen tutorial HOT 1
- Sidemenu startup template like ionic 2 HOT 1
- images zoom
- Add custom component to AbsoluteLayout at runtime
- Navigate to route after push notification is received in main.ts
- building notification system like facebook
- Complex Navigation - Navigation Best Practices
- Searchbar Example in typescript HOT 1
- Less Angular HOT 1
- Load a Tabs view after Login Page HOT 1
- nativescript-cardio-reader
- Timeline list HOT 5
- embedded lightweight web server httpd
- Todo App Tutorial
- Push Notifications using nativescript-push-notifications
- what are the best ways to make one-to-one chat UI
- Markdown Rendering in NativeScript-Vue
- [HELP!] A Custom FAB Button by Carlos Cabral
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nativescript-snacks.