Google maps generate link - google-maps

I have google maps embedded in my website. Its has markers and when clicked, it displays the property information at the position. (infobox).
Now the user wants the following functionality:
I search for a place , the map displays the place with properties. After I drag the map and get some other property, I would like to share this one to some body. can I get a link
to share the dragged position?
I know we can get the link in maps.google.com . It changes whenever we drag.
But how to do it in our website?
Is there a way in google maps api to get that link?

Listen to events on the Map
The idle event is particully useful, but can use say bounds_changed to get events while dragging (or even the drag event itself!).
In that event update whatever link you are talking about.

Related

Google Map link to markers from external site

i have a question. My website has link Show on Map that points to custom google map. That custom google map has 30ish markers, and when you click link from website, it opens that map, and focuses corresponding marker there. So you use show on map for marker 1, custom map opens and focuses marker 1 with info bubble.
link is here
Show on map
link to map
Now, since i need to replicate that Google Map because i dont have acess to it anymore, i am wondering how to get link to certain marker? Since website doesnt have any javascript or anything regarding Goolge Maps, are those links hardcoded on custom map in source code or something? Since i know iwloc and coordiantes change on links.. But on source code of that custom map iwloc is same on 3-4 ocurrances in page.
Any help is welcome. I tryed to search here but everyone makes some javascript solution. I want it to be like now... only link to that marker. Thanks
Open the specific map, open the desired infoWindow(by clicking on the marker or on an item in the sidebar) and then copy the short URL that will be shown when you click the share-button(in the top-right corner of the sidebar)

How can I make custom Google Maps markers with a custom dialog message

I need to create iframe Google Maps that I can embed on a site with a custom marker that would be the companies logo.
Once the marker is clicked, it should show a dialog with custom information instead of Google's default information with an address etc. I would like to modify it so it shows some information about the business. Just like the one that can be seen here: http://ekogaze.lv/kontakti.html
Thank you.
Creating custom marker can be found here.
Adding custom information can be done by updating values in the marker div.

Google maps marker not working on iphone

The Google map info window will not appear when I click on a marker using the iphone. The same code works on the desktop on Android.
I need the map hidden by default and then loaded in only when the user clicks the view map button as I want to keep the weight of the page down as this is for a mobile site.
The click event handler is being fired as I put an alert on it and it worked. I think it might be something to do with the order of the code when I attacked the click handlers, but thats a guess. Also, when I add draggable: true to the markers the bubble appears but I dont want the markers to be draggable.
I have set up a test page http://www.clawg.co.uk/nearby/testmap.html
A run through of this is:
I scan the DOM for data attributes values which I use to create an array of data that will be used for info windows.
I create a button on the fly that will make the map appear when clicked
When the button is clicked the map api is loaded in if its not already available
The map is then loaded
The markers are positioned on the map
The default marker icons are too small for iphone 4 making them unclickable, so I used a custom marker that was 42x42 in size.

how to dispose googlemap object?

I am using the Google Maps Control for ASP.Net. I am adding one point which is current point of bus & polyline of the points from current point to last 10 points on the page load with showing popup on current point by default.
I am using update panel for the the refresh button. There is also one input field which takes number of record to show on polyline from current point. Now I want to reset my googlemapObject on refresh button click event so that in every refresh click completely new set of points, polylines should add and shown on google map.
Is there is any method like dispose to dispose current object of goolemap.
How to resolve this problem?
Regards,
Girish
I'm assuming that you are using the Google Maps Control for ASP.NET found at:
http://en.googlemaps.subgurim.net/
If that is the case - there is an example found on their site that will walk you through how to erase icons that are added to the map.
The sample code can be found right here:
http://en.googlemaps.subgurim.net/ejemplos/ejemplo_99000_Custom-Javascript.aspx
By implementing a custom Javascript Event you will be able to change the data on your map with the refresh button - without needing to do a whole page refresh.

Controlling GDirections mini-popup-maps

I am using the Google Maps API to code a campus map for my university. On the main map, when it is being viewed in the "Map" maptype, there is a custom overlay of the campus, which is set (by using GEvent.addDomListener) to be removed when the map is viewed in Satellite or Hybrid mode. When the user gets directions, through my map, to and from the campus, a polyline and 2 markers show up, like normal. When the marker is clicked, a small popup map is display, focused on the area of campus around that particular marker.
I was wondering if anyone knew of a way to set attributes of these mini-popup-maps. I need to extend the event listener to make sure that the overlay gets taken off when the mini map is clicked out of "Map" mode. I also need to be able to set the zoom level for these maps.
Any ideas?
(code can be provided as needed, wasn't really sure what parts would be needed and didn't want to post the whole f'n thing up here.)
Doesn't look like there are any built in options to modify the infoWindow you get from the GDirection markers, but you can explicitly replace the markers once you get them back.
This post describes the process.