By Sudhanshu kumar


2018-11-08 23:04:35 8 Comments

I want the users of my webpage to be able to see an embedded google map with their location and a specified marked location.

2 comments

@Katrpilar 2018-11-08 23:17:28

A comprehensive guide on retrieving the user's location in browser - including how to display the location within a Google Map and necessary fallback considerations.

https://www.w3schools.com/html/html5_geolocation.asp

Then there's the Google Maps Api embed tool that's well documented to allow you to easily change the map as needed.

https://developers.google.com/maps/documentation/embed/start

@Chris G 2018-11-08 23:22:26

Please don't recommend w3schools, which has no affiliation with the w3c.

@Katrpilar 2018-11-08 23:40:42

I profusely apologize for for my lackadaisical human mistake of overtly not accurately describing the contents of a link of which is clearly displayed in it entirety - and just so happens to have the exact learning resources this question is referring to.

@Chris G 2018-11-08 23:45:29

This is a bad answer because answers are supposed to contain the answer, not link to it. It's also an answer to a bad question, and shouldn't exist in the first place. I didn't mention any of that, didn't even flag it, but merely pointed out that w3schools is a bad resource and shouldn't be recommended to beginners. No need to get all defensive. Further reading: meta.stackoverflow.com/questions/280478/why-not-w3schools-co‌​m

@Scott Bermingham 2018-11-08 23:14:14

You will want to look into the API @ Google Maps Platform. This site has a working example of the user's location, I would think it should be pretty easy to add a marked location to this. https://developers.google.com/maps/documentation/javascript/geolocation

@Heretic Monkey 2018-11-08 23:17:23

Please give a read to How to Answer, specifically the part titled "Answer well-asked questions".

@Scott Bermingham 2018-11-12 20:55:27

Well Alrighty Then

Related Questions

Sponsored Content

61 Answered Questions

[SOLVED] How do you disable browser Autocomplete on web form field / input tag?

41 Answered Questions

[SOLVED] How do I get the current date in JavaScript?

  • 2009-10-07 11:39:02
  • Suresh
  • 2021144 View
  • 1783 Score
  • 41 Answer
  • Tags:   javascript date

22 Answered Questions

[SOLVED] How can I refresh a page with jQuery?

19 Answered Questions

[SOLVED] Modify the URL without reloading the page

30 Answered Questions

[SOLVED] Get current URL with jQuery?

20 Answered Questions

[SOLVED] Get the current URL with JavaScript?

  • 2009-06-23 19:26:45
  • dougoftheabaci
  • 2426533 View
  • 2597 Score
  • 20 Answer
  • Tags:   javascript url

9 Answered Questions

[SOLVED] Stop setInterval call in JavaScript

31 Answered Questions

[SOLVED] Google Maps API v3: How to remove all markers?

25 Answered Questions

[SOLVED] Redirect from an HTML page

17 Answered Questions

[SOLVED] Get the size of the screen, current web page and browser window

Sponsored Content