Inserting Google Maps Coordinates Into Text Field After Marker Location Updated?
Feb 4, 2011
Hopefully a really quick question. I'm a JS novice, and am looking for a way to output the coordinates of a Google maps marker into the value of two text fields, one for latitude and one for longitude.The code below is a simple location search which returns a result with a draggable marker. Currently, the coordinates in both text fields update when the location search is performed, but not when the marker is dragged to a new location afterwards.
<html>
<head>
<style type="text/css">
[code]...
View 2 Replies
ADVERTISEMENT
Apr 2, 2010
i have to draw a line between to different coordinates which are going on google maps so for example :
[Code]...
the above coordinates are in xml format which, i later call in Java script functions and display them on the map as a simple pointers what i need is from one point of coordinates to another point of coordinates Java script would draw a line which would represent the direction from one coordinate to other .
View 2 Replies
View Related
Apr 21, 2011
On my site: [url]
I am able to move my logo on my map, is there any way of locking it's position?
View 1 Replies
View Related
Oct 31, 2011
I'm trying to remove a marker that was initialized like this:
marker = new google.maps.Marker({
position: latLng,
map: map,
draggable: true,
animation: google.maps.Animation.DROP,
title: 'Marker 1',
[Code]...
View 1 Replies
View Related
May 21, 2010
how can I get my custom markers to show? I have got my code in place, everything works except, doesn't show my custom marker?!
here is my code:
<script type="text/javascript">
//<![CDATA[
if (GBrowserIsCompatible()) {
// A function to create the marker and set up the event window
// Dont try to unroll this function. It has to be here for the
[Code]...
View 1 Replies
View Related
Sep 28, 2010
Right I have google maps connected to a database which holds stockists and their information. The user enters their postcode and radius and markers are put on the map of stockists in the radius of their postcode. I have this all working fine and the database chucks the information into an xml file fine. The problem im having is displaying the information in the pop up window of the marker.
Example Xml:
The only information displayed in the sidebar entry is the name and distance and on the marker just the name.
View 1 Replies
View Related
May 19, 2011
I'm trying to update the location of a marker in a Google Maps API. The only problem is that the marker won't update (only if i update the whole initialize() function with a setTimeout function).
It goes about the following code:
Code:
What i want is that the marker updates automatically (with AJAX) and not the whole map. First of al i thought i push the code that set's te marker in a function, and reload that every 4 seconds. But that doesn't work.
View 2 Replies
View Related
Mar 29, 2011
I have the code below but for some reason it only works when adding the marker to the map (map click). When I drag the marker around, the coordinates and closest address don't update.
This code works if I add the marker straight in the initialize() function but not when I add it within the addListenerOnce for map click event. I want to be able to add 1 marker to the map, and update its address and coordinates when dragging the marker around.
[Code]...
View 10 Replies
View Related
Jul 12, 2011
Of course, I make code for marker add and move, but how do I can make deletion option for marker? And how do I can make automatic route creator from marked point A to marked point B?
View 1 Replies
View Related
Jun 21, 2011
I have several google map markers and lightbox image gallery in the html file. I need to associate each image from the gallery with the markers.
I've tried this
Code:
google.maps.event.addListener(marker01, 'click', function() {
document.getElementById("bump");
});
"bump" is id of div with the image, but it didn't work.
View 2 Replies
View Related
Nov 11, 2010
I'm using the goMap Google Maps plugin very successfully (and I highly recommend it) - except that I can't seem to set shadows on my map markers. There appears to be support for this in the plugin source code - but there's no documentation I can find.
Anyone got an clues on how to do this? This is a simplified version of the code I'm trying to use. I have checked the obvious/stupid things - file path is correct (the image isn't 404ing in firebug), and there's no js errors being thrown, or any other warnings reported.
[Code]...
View 1 Replies
View Related
Jul 22, 2009
I want to know if this can be done using jQuery and Google Maps. In my website I have a Google map where users could add new markers with a description on it and the marker they put would be permanent on my map, meaning if they comeback they would still see the markers they added.
I also want the feature that they could just drag and drop the marker, so it would be easy to the users. What would be my approach and how would I do it?
View 1 Replies
View Related
Jul 21, 2011
I am designing a site where users can submit a location. I want to use Google Maps with a draggable marker which posts the lat, lon when dropped on a position. I was wondering if anyone knows of a tutorial or could point me in the direction of anything similar.
View 2 Replies
View Related
Jun 15, 2010
I've been playing a lot with jQuery though, and thought I'd have a try with the Google Maps Javascript API v3
I have a bit of code;
[Code]....
Everything works perfectly, except the form fields don't update once the marker is moved. I expect this is a really elementary javascript mistake!?
View 3 Replies
View Related
Nov 5, 2011
In this snippet the addresses stored in address[] is geocoded using google maps API. The problem comes when i try to pass these values on to the array flightPlanCoordinates to create a polyline. Nothing happens.
Can anyone tell me why? PS. Im quite new to JS
var flightPlanCoordinates = [];
for ( var i=0, len=address.length; i<len; ++i ){
geocoder.geocode( { 'address': address[i]}, function(results, status) {
if (status == google.maps.GeocoderStatus.OK) {
flightPlanCoordinates.push(
[Code]...
View 2 Replies
View Related
Nov 17, 2011
I am having some issues with getting multiple sets of coordinates to appear on google maps on my website. I have many items stored in a database, and each row has a field for latitude and a field for longitude. I get the data like this:
$getdeals = "SELECT * FROM deals WHERE cityid='$cityid'";
$result = mysql_query($getdeals);
while($row = mysql_fetch_array($result)){
$title = $row['title'];
$lat = $row['lat'];
$lng = $row['lng'];
//This is where I think I would try to add the point to the map
}
View 13 Replies
View Related
May 13, 2011
I search through the forums and google but didn't find anything on this, but I was wondering if anyone was having or has had issues with google maps changing their lat/long coordinates, even when a frozen version is declared?
<script type="text/javascript" src="http://maps.google.com/maps/api/js?v=3.2&sensor=false"></script>
In the geocoding portion:
[Code]...
View 1 Replies
View Related
Nov 28, 2010
I am trying to add markers to Google Maps, they are working fine but some of the markers are of same location, thus Google Map will show only one marker for them. Is it possible to show all markers no matter if they are of same location.
View 1 Replies
View Related
Aug 27, 2010
I'm attempting to find coordinates for several addresses at a time. I'm using a for-loop to loop through an array of addresses. I figured it would be best to have a separate function to evaluate the coordinate given an address, and just call it in every loop.
Note that my code below is simplified (I removed the for loop because that's not where I'm having trouble). I know that the issue is probably because I'm trying to return a value from an anonymous function... I tried making the variable global, I tried having a return line from within the anonymous function, nothing has worked... any tips?
Code follows
View 5 Replies
View Related
Nov 23, 2010
My goal is to display an address. In the example on google, you can input it through a form:[url]
I would like the map to show the location+marker when I open the page, not after clicking a submit button.
However, I only want an address in my html. I want the API to convert it in a LatLng format.
It's all in the source code of the page mentioned above.
View 2 Replies
View Related
Aug 25, 2009
I'm new to this forum and JS. I simply want to be able to use the Google Maps API v3 to allow a location value entered in my app (by the user) to show that location via Google maps.The code below accomplishes this via an onClick event. How to accomplish the same WITHOUT an onClick? To be clear, it appears I need to be able to perform the geocode lookup to get the long/lat coordinates and then apply them. That all needs to occur on page load.
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
[code]....
View 5 Replies
View Related
Oct 2, 2011
I am trying to create an application which utilizes the distance finder. I want to be able to calculate the distance between two points. I have managed to (with the aid of a lot of tutorials) be able to calculate the distances between two points.
Now, in the application, there will be times where the user does not supply us with their location to calculate the distance. In this situation, the Latitude and Longitude will be calculated and this location will be shown to the user in the address form instead of with Latitude and Longitude.
What I have on one page is the distance calculator:
And on my other page I've got the latitude and longitude calculator.
I'm also stuck because these two pages will act as functions and will be linked to the main page where the input and output will occur. I'm new to JavaScript, but I am willing to do a lot to get this to work.
View 2 Replies
View Related
Jan 5, 2011
I want to have several maps on my aspx/ascx-Webpage, but only the last one is rendered after PageLoad(). Is there any limitation for that in the goMap() plugin?
View 1 Replies
View Related
Aug 15, 2010
I have a table with a two cell. One cell has a text field, the other is empty. I want to place an image in the second field depending on the value in the text field. Not sure how to do this. Do I assign the image to the fields id?
View 13 Replies
View Related
Oct 1, 2011
i need to be able to add geo location on the map. i would like to click a button and add my location marker on the map. enclosed is my code this is using google map api v3
Code:
<script type="text/javascript">
function initialize() {
[code]....
View 1 Replies
View Related
Nov 11, 2010
I am currently building a web app that uses Google Maps V3 api.
You select a check box which then shows a marker on the map.
My issue is, when you select and the marker is placed, I need the map to focus to that point, it currently embeds but doesn't focus.
Is there a particular function I could use to achieve this?
My current code is shown below:
View 2 Replies
View Related