Move location of google maps pin in link? - google-maps

Ive created a link to a google maps page. The pin appears to be in the correct place until I go to street view, and then the view is 1 door down from where it should be. How can I move the pin so its in the correct place in the link?
Ive tried entering different addresses but I cant get it to show the right place, so I think I need to move it manually. If I choose the 'move marker' option it tries to change the location for that address, but I dont actually need this and my changes dont seem to have been applied anyway.
Thanks

Related

Google maps - current location - no HTML5

I am using google maps on a simple HTML website. I can center the map on user's current location using HTML5, but that requires getting permission from the user.
Now, when I go to maps.google.com, the map is centered around my location pretty accurately, without asking my permission.
How can I do that? When I define the map in my HTML webpage, I need to identify the center. How can I set the center to the center that google maps automatically finds?
Thanks.
assuming your in chrome go to the google maps page, then press f12 goto the resources tab, expand local storage, session storage and cookies, delete all entries from there, close the tab, go back to maps, notice it will no longer have your location, you'll need to click on the sniper type gps icon and it will ask you in you browser if you want to allow location.
answer being it has to ask you for permission, there is no compromise whether it's google or anyone else.
Your only other option, if you are serving any content server-side, would be to attempt to get the user's location from his or her IP address. There are a handful of APIs and services out there that will give you approximate locations, but your mileage may vary greatly. And, as I mentioned, you would have to execute that code server-side and then return some lat-long back to the client side to initialize/update your map.

How to Show Driving Directions on New Google Maps via URL Link

I have a simple Google Maps link on my site that opens a new page and loads the driving directions from our location to customer's address.
The link is something like
https://maps.google.ca/maps?saddr=[our address]&daddr=[customer address]&dirflg=d
Where [our address] is replaced with our address and [customer address] is replaced by the customer address. The Google Maps is loaded properly with the directions drawn out on the map but is there a way to expand the "List all steps" for the default selected direction on page load?
I'm guessing Google Maps will automatically load the "best" route when the page is loaded but currently the user has to manually click on the "List all steps" to view the step by step directions. I want it so that when the user clicks the link on my site then it'll automatically load the map directions along with the step by step directions already opened. Is there some kind of special URL parameter that I can pass to do this?
I've been looking for the same solution - If you are able to format the link in the following way this works:
https://www.google.com/maps/dir/[customer address]/[our address]/am=t/
It would be good to figure out how to submit it from a standard HTML form though.

Google Map embed for Antarctica shows wrong location

I want to display the current location of a research ship students at my University are currently on. Their location is off the coast of Antarctica, but the embed code I get from that page shows a bar in NY named "Antarctica".
https://www.google.com/maps/preview#!q=S+63%C2%B048'++W+066%C2%B012'&data=!1m4!1m3!1d17155058!2d-66.2!3d-63.8!2m1!1e3!4m14!2m13!1m12!3m8!1m3!1d346321!2d66.2!3d63.8!3m2!1i1440!2i805!4f35!4m2!3d-63.8!4d-66.2&fid=
What can I do?
Seems to be working for me... I copied your URL directly and it displays a part of Antarctica- How are you embedding it? Perhaps you could create a 'jsbin' or 'jsfiddle' to recreate your problem. That would make it a lot easier for people to help... EDIT: also, note that the url has an apostrophe in several places. This is why your link above stops at B048 instead of using the whole link.

how to add custom marker in google earth api?

Instead of the regular placemark that is a yellow pin. I want to instead use this icon.
http://maps.google.com/mapfiles/kml/pal3/icon39.png
I'm not sure if I have to import a KML file or if I can just use it by loading it up. If anyone can help me just post the icon somehwhere on google earth, I would appreciate it.
I looked through some google kml files, and guides, but couldn't get it to work.
Thanks
The easy way:
If you are creating your KML file using the Google Earth client
right click the icon
choose 'properties'
click on the icon - top right
click on 'add custom icon'
paste in the URL to icon you want to use
otherwise you will need to edit the .kml file with some kind of text editor
find the that is being used for the placemark in question
in the change the value to the URL of the icon you want
if you need help to find the correct style
look for placemark name and find its
this normally has a '#' tag in front of it
do a search in your document for that style (removing the '#' tag)
sometimes that finds it straight away (if you see the stuff there go for it)
otherwise you will need to find both the styles (2 of them) listed under it (use same approach as above)
then proceed to change the for the in BOTH places

Adding google maps to webpage

I want to create one webpage with one textbox, one button and one div containing the google map. My use case is whenever I enter some address in textbox and click on the button the google map for that place should get rendered in that div. Can anybody please help?
You want to use the Google Maps API:
https://developers.google.com/maps/documentation/javascript/
and either the geocoding service:
https://developers.google.com/maps/documentation/javascript/geocoding
or autocomplete:
https://developers.google.com/maps/documentation/javascript/places#places_autocomplete
The samples linked there should give you plenty of code to draw on.