Showing Device (NodeMCU) Location using Map Widget

Can anyone help me about how to show the exact device location on the app via Map widget if it moves from one wi-fi router to another & get connected to that network? I mean if the device get connected to a new network then how could I know that the new location on Map widget on the app that where my device is now.

What GPS device do you have connected to your NodeMCU?

Have you read the map widget documentation?
http://docs.blynk.cc/#widgets-interface-map

Have you thought through how your NodeMCU is going to connect to the various networks? (This is doable in a variety of ways, but won’t happen without some work from you).

Pete.

A conundrum… Can’t connect if you don’t know where it is and don’t know where it is if you can’t connect :stuck_out_tongue:

Either way, not a beginner project. But have fun learning!

I’m not using any GPS module with the NodeMCU. So, if I release my project into an app & the device get connected to different wifi network in several times by entering ssid & pass from the connection interface on the app and then if I connect it to my router in my house it will show my house location on the map & if I go to my friend’s house & connect it to his router then it will show that location on the map. Can u have any idea about how to change the code?
image

I don’t understand how to use the 1st one. 2nd one shows a fixed lat & lon value which is I’m not talking about. And yeah, I’m a beginner. :slight_smile:

I’m not using any GPS module with the NodeMCU. So, if I release my project into an app & the device get connected to different wifi network in several times by entering ssid & pass from the connection interface on the app and then if I connect it to my router in my house it will show my house location on the map & if I go to my friend’s house & connect it to his router then it will show that location on the map. Can u have any idea about how to change the code?
image

I don’t understand how to use the 1st one. 2nd one shows a fixed lat & lon value which is I’m not talking about.

Well, good luck with that!

You can’t get location information from your router.
There are tools for getting an approximate location based on your external IP address, but actually all you’re getting is the location of your ISPs data centre.
These tools say that my location is about 15 miles from where I actually live, and all users of the same ISP in probably a 50 mile radius will show up as having the same location, because they use the same data centre.

You need a GPS receiver attached to your NodeMCU to know where it is. That still won’t be infallible, as the GPS will need to be able to get a good signal before it can get a location fix and that can be tricky indoors.

Pete.

thanks a lot for ur kind information :slight_smile:

There are many API servies where you can send IP address and they will return lat lon. They are usually paid

Well, thanks for ur information sir :slight_smile: As I’m a beginner that’s seems costly to me.