FAQ Database Discussion Community


Google Maps API Remove stored markers

android,google-maps,google-maps-api-3
I am saving Markers that I put in the map using an array however I would like a AlertDialog showing up asking me if I want to delete the marker in question when I tap a Marker but how would I do that? this is the code I am using...

How to center polygon in google maps javascript v3?

javascript,json,google-maps,google-maps-api-3
I have a google map with polygon array from JSON. I need to center the polygon after the loading of map. I am having trouble to this part. Pls. someone to help me. THIS IS MY SAMPLE JSON [{"ZoneID":7,"Name":"Testing Site Zone","Type":"Home","TypeID":0,"Perimeter":"25.774252,-80.190262 18.466465,-66.11829 32.321384,-64.75737","CellIds":"","Location":"","Company":"Company Co....

update native google maps app from a web app

javascript,android,ios,google-maps-api-3,web-applications
Can I have a web app running, and a native google maps app launched by the web app running on a droid, and have actions performed by the user on the web app automatically update the native map app? Ex. User clicks link on web app. Query string values in...

Facing error on Maps API v3 Places Autocomplete Form

jquery,google-maps,google-maps-api-3,autocomplete
I am using Maps API v3 Places Autocomplete form last few month for my project but when I am adding to another page Places Autocomplete is not working. I am getting error on this line: for (var component in componentForm) { document.getElementById(component).value = ''; document.getElementById(component).disabled = false; } and getting...

Generate single global infowindow for all Google markers

javascript,google-maps,google-maps-api-3,infowindow
I have this code that I get from another post. I am new to JavaScript and tried to modify it so that when I click a marker, I want the previous infowindow to close before the new infowindow opens to keep the map clean. I know this question have been...

Google MarkerClusterer does not show the markers

javascript,google-maps-api-3,markerclusterer
I am trying to replace my data with the ones provided by this sample code, but my code does not work. I just added an array called results and tried to pass its lat and lan values to the map but for some reasons it does not work. <!doctype html>...

Add Marker in Angular-Google-Maps

javascript,angularjs,google-maps,google-maps-api-3
I'm currently having some trouble adding a marker on click to Google Maps. I'm using http://angular-ui.github.io . Here is my code: HTML: <ui-gmap-google-map center='map.center' zoom='map.zoom' events="map.events"> <ui-gmap-marker coords="map.marker.coords" idKey="map.marker.id"></ui-gmap-marker> </ui-gmap-google-map> And there is my JS: $scope.map = { center: { latitude: alat.value, longitude: alon.value }, zoom: 15, streetViewControl: false, events:...

Raty Star rating in Google map infowindow

javascript,google-maps,google-maps-api-3,infowindow,raty
I have added marker on google map with some search results. var infowindow = new google.maps.InfoWindow(); var marker, i; for (i = 0; i < locations.length; i++) { var contentString="";var image_path1=""; contentString += '<div class="browse-map-venue" style="padding:5px;width: 230px;">'; contentString += '<div class="rating" style="float: right; padding-right: 10px;">'; contentString += '<script type="text/javascript" src="<?php...

How to plot Google placeid points on a map

google-maps,google-maps-api-3,google-places-api
So, tricky problem... I've put together a bunch of extra attributes to associate with food related places to create a bespoke version map of locations. I've generated this using Google places. I've only stored the placeid, as per terms of service, associating those I've chosen with the extra attributes I've...

Pop-up info box in google maps

javascript,google-maps,google-maps-api-3
I have the following code and would like some help adding pop-up info boxes for each custom marker. Currently I can set the coordinates for each marker in my code but I would also like to add additional information in a pop-up info box once the marker is clicked. I...

Can I set the stroke style in Google Maps Data Layers?

javascript,google-maps-api-3
I am trying to find a way to change a stroke style of lines in Google Maps Data Layers. In this page, the examples shows how to create polygons, and change the stroke width and the fill color of the polygons. However, I cannot find the way to change the...

Adding images to an info window from a GeoJSON file? Google maps javascript API

javascript,google-maps,google-maps-api-3,geojson,infowindow
Basically, I want to display an info window from a marker that can show several information from a GeoJSON file, such as date, hour and type of event (I can do all of this by now)... but I also need a specific image for each marker info window. var infowindow...

Add Google map or bing as base layer in ArcGIS api for android

android,google-maps-api-3,arcgis
I'm using the ArcGIS Runtime SDK for Android to build my application. I want to add a Google map as the basemap. Is that possible? Can I use ArcGISFeatureLayer to add a Google map layer or other layer to my MapView?

Custom Google map marker icon

css,google-maps,google-maps-api-3,jquery-gmap3
So I am using gmap3 to dynamically load my map marker icon based on user image profile photo. Ideally, I want to have some custom styling on the marker icon image, and each marker icon image is different from user to user. Here are two difficulties I have encountered: Google...

Google map JS code - “this.activeInfoWindow.close()” - scope & this

javascript,google-maps,google-maps-api-3,scoping
In the following Google map JS code the "this.activeInfoWindow.close()" statement does not work as expected. I think I am missing some important scoping principle here. Is there a better way to do this? I am trying to learn better namespacing and scoping and OO techniques. var data = { "cities":...

How to make the marker movement smooth on google maps (javascript)?

javascript,google-maps,google-maps-api-3
I have made a simple map.js file. I have to loop through all the locations and plot marker accordingly, erasing previous one and show smooth marker movement. This is what I've tried. So far, it just puts the marker on the final location ad I know why also (because of...

how to execute google maps event “bounds_changed” only once

javascript,google-maps,google-maps-api-3
How do I tell the google map event "bounds_change" to only work when the map is initially loaded, and not after user change?

google maps scaleControlOptions changing position of scale on map

javascript,html5,google-maps,google-maps-api-3,html5-canvas
I noticed that there was no option to change the position of the scale on google maps using scaleControlOptions (correct me if I'm wrong) and was wondering if there was any way to get around that and display the scale on the bottom left position.

add label overlay Google Maps

google-maps,google-maps-api-3,label
I'm success add infowindow <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Google Map Lazy Load</title> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script type="text/javascript" src="http://localhost/label/label.js"></script> <style> #map-canvas{ width:100%; height:500px; position: "absolute"; top: 0px; left: 0px; overflow: "hidden"; } </style> </head> <body> <div...

Setting up Google map pans in Code igniter with BIOSTALL google map library

javascript,codeigniter,google-maps,google-maps-api-3
I learned from this thread that setting up google map pan is pretty simple Job in Java script using google map API. Unfortunately I am not good in Java Script and my project is in Codeigniter I used BIOSTALL google map library for Codeigniter which is working excellent (Thanks to...

SVG Marker on Google Maps Not Appearing

javascript,google-maps,google-maps-api-3,svg
When I copy Google's example code for SVG markers, everything works fine, but when I create my own SVG marker in Inkscape, the icon doesn't appear. var walkIcon = { path: 'm 375.65048,522.72658 c 1.40058,1.33792 3.38088,2.4914 3.58389,4.62022 0.33282,1.7212 1.62154,3.13596 3.271,3.67594 1.03889,0.25403 1.6602,2.07967 0.0883,1.75669 -1.5495,-0.2461 -2.78641,-1.31821 -4.00567,-2.21914 -0.57041,-1.04216 -2.10653,-2.1964 -2.20994,-0.258 -0.60169,1.67286...

Google Maps API Directions Service return directions in xml format

javascript,json,xml,google-maps,google-maps-api-3
I've succesfully done the process of getting the directions: function getRoute(){ var formato = $('#formato-bizis-select').val(); var start = $('#input-origen').val(); $.post("index.php/calcular-ruta", $('#bizis-form').serialize(), function(data){ var end = data.lat + "," + data.long; var request = { origin: start, destination: end, unitSystem: google.maps.UnitSystem.METRIC, travelMode: google.maps.TravelMode.DRIVING } directionsService.route(request, function(response, status) { if (status ==...

Printing page with multiple embedded Google Maps in WebKit produces tile errors

google-maps,google-chrome,google-maps-api-3,printing,webkit
Printing the following example page in either Chrome or Safari on Mac (i.e., WebKit) produces misplaced map tiles in the printed output from the second map onwards. It works on the webpage itself, and printing it does also seem to work in Firefox. Need it to work in Chrome or...

How to search for a place within specified area in Google Maps

javascript,google-maps,google-maps-api-3
I have an area (multiple regions in France) on the map described by geographical coordinates (longitude and latitudes). Is there a way to pass this set of coordinates to google API and limit search results within this area? We are using the following example from google documentation: https://developers.google.com/maps/documentation/javascript/examples/places-searchbox Thank you...

Google Map API Multiple Infowindows

google-maps,google-maps-api-3
I'm currently developing a Google Map feature which displays multiple markers along with information regarding each location within a infowindow. I've managed to display multiple markers but the infowindows don't seem to be display on click. This is what I'm trying to achive - http://jsfiddle.net/upsidown/8nKxh/ Any suggestions would be great.Thank...

Toggle custom legend on google maps using a radio button

javascript,html,google-maps,google-maps-api-3,google-fusion-tables
I created a legend for a google map using the following code from Google Developers Website <title>Fusion Tables Layer Example: Legend</title> <link href="/apis/fusiontables/docs/samples/style/default.css" rel="stylesheet" type="text/css"> <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> <style type="text/css"> #legend { background: #FFF; padding: 10px; margin: 5px; font-size: 12px; font-family: Arial, sans-serif; } .color { border: 1px solid; height:...

Load Google Maps markers via ajax

jquery,ajax,google-maps,symfony2,google-maps-api-3
I want to load the markers for a Google Map via ajax with my own geolocation service. The ajax functionality comes from jQuery. My code to load the markers is the following: $(document).ready(function() { var myLatlng = new google.maps.LatLng(49.47143, 11.107489999999984); var mapOptions = { zoom: 8, center: myLatlng }; var...

Google map api load grey map instead of map images

javascript,jquery,google-maps,google-maps-api-3
i am having this weird issue with google maps api. I am trying to show map with clickable pins where data is loaded from api. Everything seems to work: data is loaded, pins appear, toggles work... however map is just grey - no map images are loaded. Its draggable, markup...

google map animate or highlight a particular marker in a bound

javascript,google-maps,google-maps-api-3,google-maps-markers,google-maps-api-2
I have multiple markers in an bounds. I want to animate or highlight particular marker in an onclick event from html. Map code: var map = new google.maps.Map(document.getElementById('map-canvas'), { mapTypeId: google.maps.MapTypeId.ROADMAP }); list = [ [51.503454,-0.119562], [51.499633,-0.124755] ]; var bounds = new google.maps.LatLngBounds(); list.forEach(function(data, index, array){ var marker = new...

unable to hide two dimensional marker array in Google API 3

javascript,arrays,google-maps,google-maps-api-3
My marker is at the end I am unable to hide the marker using setMap, Error in Console Please help! Thanks in advance markers[i][j].setMap(null); markers.setMap(null); var markers = [ ['office', 'Albania', 42.158410, 19.940845], ['production plant', 'Albania', 40.198905, 20.039722], ['R&D service', 'Albania', 41.090835, 19.545337], ['office', 'Algeria', 28.164666, 3.160335] ]; `Uncaught...

Not allowing Google Maps api to place a marker more than once

javascript,html,google-maps,google-maps-api-3,coordinates
I have made a html file which is integrated with javascript which lets me retrieve data for an XML file and plot them coordinates automatically onto the map. It does this because I have a timer placed into the script to tick every 4 sec so that the map can...

Google Maps numbered markers all displaying same number

javascript,google-maps,google-maps-api-3
I'm building a map where I have to have numbered markers, along with a list underneath where the markers match what's displayed on the map. I'm loading the array of addresses and populating my list from the same array. The marker positions are showing up correctly on the map and...

skip or disable google maps marker that are close in radius 5 to 10 meter

php,arrays,google-maps-api-3
I have this array as latitude and longitude marker. How to skip marker that are close in range about 5 to 10 meter? getting array from text.file [{"referid":"3913","categoryid":"393","latitude":"-6.25424783405257","longitude":"106.827406067554","image_name":"IMG_20150429_115341_2613531.jpg","upload_date":"2015-04-29 11:54:26","description":"Cluster Kemang3 - Segment1","address":"Jalan Duren Tiga Raya No.37, Pancoran, Kota Jakarta Selatan, Daerah Khusus Ibukota Jakarta 12760, Republic of...

google map in asp.net page

css,asp.net,vb.net,google-maps-api-3
I was trying to load the google map in my vb.net page but the map is not showing on the page. Any idea what is wrong here? <%@ Page Language="vb" AutoEventWireup="false" CodeBehind="GoogleMap.aspx.vb" Inherits="GDemo.GoogleMap" %> <!DOCTYPE html> <html lang="en"> <head runat="server"> <title></title> <style> html, body, #map-canvas { height: 100%; margin: 0px;...

export KML google map

javascript,google-maps,google-maps-api-3,google-maps-markers
I use google map APIv3, I create my map with different marker and I create an itinerary everything works. My question is: I want export my itinerary in KML file with javascript, I have make lot of serch but no good answer or tuto found, anyone have solution or export...

Google Map API: Why we need to set title for Marker object?

javascript,google-maps-api-3
It does make sense to me for setting the title for Markers in google map api. It does not show or anything. So what is that for?

How to fully disable streetview from google maps

google-maps,google-maps-api-3,google-street-view
I've disabled streetview controls like so: var mapOptions = { zoom: 16, center: myCenter, streetViewControl:false }; var map = new google.maps.Map( document.getElementById("map"), mapOptions ); Which takes the streetview control off of the map BUT if you click on a point of interest with a panoramic image / link to streetview...

hiding and showing direction line in googlemap using javascript

javascript,google-maps-api-3
I am using directionDisplay.setMap(null); to remove the direction line, but I also want to show the directionline again.. How do I do it?

change color of a circle if the user position is within its range

javascript,google-maps,google-maps-api-3
I have a map on which there are some circles, each one with a certain radius, and on the page load, I get the position of the user and show it on the map. At first all the circles are red, so I want to check if the current position...

Creating polylines from mysql database in google maps

php,mysql,google-maps-api-3
I am trying to draw a polyline on my custom google maps map with latitudes and longitudes stored in a MYSQL database. I currently get the geodata like this: $sql = "SELECT lat, lng from locations where deviceid = '$wert';"; require_once ('config.php'); $db_link = mysqli_connect (MYSQL_HOST, MYSQL_BENUTZER, MYSQL_KENNWORT, MYSQL_DATENBANK); mysqli_set_charset($db_link,...

google maps refresh without displaying gray

javascript,jquery,mongodb,google-maps,google-maps-api-3
I am using the Google Maps API v3 in javascript, and I am constantly reloading the map with an app.get, and adding layers and bookmarks using mongodb. To erase everything I reload the map, and while it's loading a gray background displays in the div that contains the map. What...

Dynamically change Google Maps icon by type in array data

javascript,arrays,google-maps,google-maps-api-3
I am completely new to javascript and have been tasked with converting an old jvector map to the google maps API. I think i'm doing pretty well so far! I've managed to get the map to populate with all the right markers in all the assigned spots, with nice shiny...

Geocode rest api - filter for only latitude and longitude

google-maps,google-maps-api-3
I have a restful URL to look up an address using google's geocoding service. It works but provides me more information that what i need. Is there a way to only return the latitude and longditude part of the json result. http://maps.google.com/maps/api/geocode/json?address=300+Collins+St,+Docklands,+VIC&sensor=false&components=country:AU...

Laravel and Geocoding markers (nearby users) do not update correctly

javascript,google-maps-api-3,laravel-5
I try to show on a google map markers that are near the current positon. If the map is dragged it will update the center coordinates and recalculate the markers around that center. The initial markers around the current users positon are showing correctly but when i drag the map...

Hidden labels reappear when switching to satellite view

javascript,google-maps,google-maps-api-3
I've got a custom style applied to a Javascript Google Maps API (v3.20). I'm using a custom style which hides all labels except for roads and water. The labels hide properly when in Map view, but upon switching to satellite, the labels reappear permanently (unless you uncheck the checkbox under...

Leaving a function to hide the map causes it to show a wrong location as its centre

javascript,jquery,google-maps,google-maps-api-3
I have a map and two buttons. One to show and the other to hide the map. If I remove hideMap function the map will be shown properly (Show all markers and they are at the centre of the map), but if I leave the hideMap function, the map still...

set fill color marker google map

javascript,google-maps,google-maps-api-3
How can I use my last column to set the color of the marker? google.load("visualization", "1", {packages:["map"]}); google.setOnLoadCallback(drawChart); function drawChart() { var data = google.visualization.arrayToDataTable([ ['Lat', 'Long', 'Name', 'Color'], [0.001, 0.002, 'Test 1', '#56df23'], [0.003, 0.004, 'Test 2', '#0023f6'] ]); var options = { showTip: true, useMapTypeControl: true }; var...

Get Array of all points of Polygon - Google Maps Drawing Tool API-3

javascript,google-maps,google-maps-api-3,google-polyline
i am using Google Drawing tools for drawing polygon/rectangle on google maps, now i need to show markers that falls inside the drawn polygon and for that i am using geometry.poly.containsLocation method which takes a point(latLng) and an array of polygon points. if i use maps.polygon I can get polygon...

ACF Multiple Map Markers

wordpress,google-maps,google-maps-api-3,acf
I'm using Advanced Custom Fields and want to pull in the field called 'location' to display some locations on a map. How would i adjust the following code to display multiple markers from my location field? The format of the custom field is like so: echo 'Location: ' . get_field('location');...

Any way I can load KML data from Google maps (again) via JS API?

javascript,google-maps,google-maps-api-3,kml
I’ve been working on a little ember app for a while which loaded articles from a local newspapers API and presented it in a nice layout. As these articles are all about travel destinations, the navigation is based upon a big map with markers in the background of the page....

Reverse GeoCoordinate Class gives Location Not found error

android,api,google-maps,google-maps-api-3,reverse-geocoding
i m using google Reverse Geocoding API in my app, i m succussfully able to get get coordinate using google geolocation API. Now i m trying to get Location Name from Reverse Geocoding API , but always returns Location not found error here is my code: Geocoder geocoder= new Geocoder(MainActivity.this,...

google maps fitBounds not working with ajax function - only seems to work with one marker

javascript,jquery,ajax,google-maps,google-maps-api-3
I'm having a strange issue with fitBounds not working after an ajax call. On the initial page load, fitBounds works fine, and it centers 5 markers. However, after I click on one of the dropdown filters or the pagination (which triggers an ajax function to update the markers, it doesn't...

Printing and lots of google maps (api)

javascript,php,jquery,google-maps,google-maps-api-3
I think I'm in over my head here but I'm so close to finish so I hope you can give me a hand. I made a web application to deal with invitations for an event. It manages the invitations and clusters people together and also arranges all the letters that...

Attaching different infowindows to group of polygons google maps

javascript,arrays,google-maps,google-maps-api-3,polygons
Right now my code looks like this: // create a LatLng array out of given coordinates string for (var i = 0; i < coordinateString.length; i++) { var polygonCoords = new Array(); var j = 0; var z = j + 1; while (z < coordinate.length) { if ((j%2) ===...

google maps iOS/android limits

google-maps,google-maps-api-3
I am developing a mobile app which will use google maps. Does Google maps for iOS/android maps have usage limits which my app can use? I assume there would be or else couldn't an app that gets popular then make millions of calls to google a day which would be...

HTML5, geolocation in real time with marker

javascript,html5,google-maps-api-3,marker
I have this code: function startTracking() { var trackId = navigator.geolocation.watchPosition(successCallback, null, {maximumAge:1000, timeout:60000, enableHighAccuracy:true}); function successCallback(position){ map.panTo(new google.maps.LatLng(position.coords.latitude, position.coords.longitude)); var marker = new google.maps.Marker({ position: new google.maps.LatLng(position.coords.latitude, position.coords.longitude), map: map, title: 'Posizione Attuale' }); marker.setMap(map); }; } Now the app create a marker every time that I move. I...

Google Maps not designed to work in multi-views?

google-maps,google-maps-api-3,multiviews
Checking my understanding of Google maps: I am developing a web page that displays a number of different types of information for my employer's facilities. I have been using a multiview, and activating the proper view depending on user input (button toolbar). When I add a view to be a...

Geoxml3 CreatePolygon function

google-maps-api-3,geoxml3
I am trying to know how to use the createPolygon function in the parser options. This is my index file but it gives me this error: Cannot read property 'bounds' of undefined. <!DOCTYPE html> <html> <head> <meta name="viewport" content="initial-scale=1.0, user-scalable=no"/> <meta http-equiv="content-type" content="text/html; charset=UTF-8"/> <title>Geoxml3</title> <style> html{height:100%;} body{height:100%;margin:0px;} #map_canvas{height: 90%;width:...

Google Maps API - show marker from select

javascript,html,google-maps-api-3,google-maps-markers
I have Google maps on site (www.maclife.pl/pl/kontakt) with 4 markers. I don't know how I can move map between markers when I change select options (like First marker...) var map; function initialize(){ var mapOptions = { scrollwheel: false, zoom: 15, center: new google.maps.LatLng(52.2081935, 21.0220677) }; map = new google.maps.Map(document.getElementById('google-maps'), mapOptions);...

Showing a map, while retrieving coordinates from a db through ajax/php

javascript,php,jquery,ajax,google-maps-api-3
I have to retrieve coordinates for a specific place from a db and then show a map centered on them.. My solution seems not working because it tries to open a map without coordinates function readyf() { var map; var info; var lat; var lon; function initialize() { $.ajax({ method:...

Use Google Map V3 API ClientID in Application with no URL

javascript,google-maps,google-maps-api-3,webbrowser-control
Need to get Google Map V3 API work in my application with purchased ClientID. The application is using WebBrowser Control to load html into documentText and the Url is 'about:blank'. The problem is I can't put about:blank into authorized URLs list in google map console. Also I can't host html...

SearchBox in GWT Maps V3 Api (branflake2267/GWT-Maps-V3-Api version 3.8.1)

javascript,google-maps,gwt,google-maps-api-3
I am develop an app using GWT Maps Api V3. I try create Place search box like example of Google Maps JavaScript API(link Place search box - Google Maps JavaScript API ) I have viewed the javascript code, they create SeachBox by using google.maps.places.SearchBox But in GWT Maps Api V3...

Remove previous Directions Route Google Maps

javascript,google-maps,google-maps-api-3
Hi, I am trying to plan a route from the info window, but i am unable to remove the previous set route. I tried setMap(null) but it didn't work. I am using a callback for an event listener as i need to pass parameter which is returned from an...

Create new marker on google maps through browser [closed]

google-maps,google-maps-api-3
I want to give that functionality to my users. Use must be able to mark his location and get marked position's coordinates. How shall i do that with google maps API?

Error with formatting google map api. Cannot view google map embedded with api

google-maps-api-3
I have an embedded map using iframe and want to change to using an api. I've used the code from the google website to test, added the api key, but the map doesn't show on my webpage. Any ideas what I'm doing wrong? http://www.lithicsireland.ie/Archaeology_Projects_Irish_Lithic_Landscapes_Chert_Provenancing.html The code I've used is: <script...

Draw a doughnut in Google Maps JavaScript API (highlight the outside of inner circle and the inside of outer circle) [duplicate]

javascript,google-maps,google-maps-api-3
This question already has an answer here: Draw ring (not circle) in Google Maps API 2 answers How to draw a doughnut with Google Maps JavaScript API? For highlighting the outside of inner circle and the inside of outer circle. My idea is to put the inner circle before...

Google Maps adding marker from ajax using jquery

javascript,jquery,google-maps,google-maps-api-3
I am trying to add google maps to my web page, the web page has div with id of radar with width specified. I get coordinates from a second page using jquery ajax method, and plot them on the map using Marker. But only the last marker is displayed nothing...

find the distance between two places on the map and the car route in c# or asp.net

c#,asp.net,google-maps-api-3
I am using this following code to find out distance between two locations.When i comparing my distance(Miles) with other sites, my values is differs wrongly. Extractly i want distance in Miles(direction via Car) public double getDistance(string origin, string destination) { System.Threading.Thread.Sleep(1000); double distance = 0; string url = "http://maps.googleapis.com/maps/api/directions/json?origin=" +...

Calculate driving distance between user location and many destinations via javascript loop

javascript,json,google-maps-api-3
I have a json feed with many locations: http://hcafeeds.medcity.net/rss/er/ntx_rss_feed.xml I plan on obtaining the user's location via html5 geolocation. At this point, I'd like to loop through the json feed and output the items from the feed along with their distance from the user's location. I've tried every which way...

Google Map API V3 - infowindows @ markers on 2 maps

javascript,google-maps,google-maps-api-3
I am working on a Google Map API V3 code, I am a beginner in JS and I am a little bit confused. Here is what I am trying to do : I have a database with Lat/Lng, address, a picture, a description.... etc On my final page, i have...

Plotting POINTS using GeoJSON

google-maps,google-maps-api-3,geojson,points
I am trying to plot points on a map using GeoJSON. I read the documention which states: You can load and display a GeoJSON file by calling the loadGeoJSON() method of the data object (https://developers.google.com/maps/documentation/javascript/datalayer ) However, the sample code on the same page shows: map.data.loadGeoJson( ...) So I use...

Google maps styled marker z-index change not working

javascript,jquery,google-maps,google-maps-api-3
In this page I am trying to bring a clicked (styled) marker (or one selected using the vorige/volgende - previous/next - buttons) to the top by setting zIndex to google.maps.Marker.MAX_ZINDEX + 1 (and restoring zIndex to the previous value upon another marker being clicked) using this.styleIcon.set('zIndex', google.maps.Marker.MAX_ZINDEX + 1); in...

Geocode two or more addresses

javascript,api,google-maps,google-maps-api-3,google-api-v3
I'm interested in geocode addresses client-side https://developers.google.com/maps/articles/geocodestrat#client I found a piece of code in this website http://opengeocode.org/tutorials/googlemap/googlemaps_6.php#example_6 and I tried to modify in order to achieve my aim. The problem is that I only get the first address. What's wrong? <!DOCTYPE html> <html> <head> <title>Google Map Template with Geocoded Address</title>...

Page reloads if a second textSearch performed

google-maps-api-3
I use the Google Maps Javascript API to embed a map with the following code: var loc = new google.maps.LatLng(geolocation.latitude, geolocation.longitude); var mapOptions = { zoom: 13, center: loc }; var mapRequest = { location: loc, types: ["car_repair"], radius: 5000, query: "midas" }; var map = new google.maps.Map(document.getElementById(mapId), mapOptions); var...

How to connect two markers with a line in Google maps api3

javascript,html,google-maps,google-maps-api-3,coordinates
I have made a html file which takes data from an XML file and uses the data on it to plot two markers on a map is there any way I could connect these two markers which have no permanent position this is my code for the markers. <!DOCTYPE html>...

Get bounding polygon coordinates from Google Maps

google-maps,google-maps-api-3,maps,geocoding
Does Google Maps(or any other provider[commercial/free]) provides API(s) that can return bounding polygon coordinates of place search? I'm not talking about sw-ne coords only, rather, actual boundary that perfectly defines the shape of a place. Place could be city, or more fine-grained identifiable place? I don't know much about Google...

How do I pass Google maps lat and lng values and save to MySQL database?

php,mysql,google-maps,google-maps-api-3
I am writing a Google maps application where the user can click where they want to save a marker by filling a form in an InfoWindow and then clicking a submit button which saves the data to a MySQL database. A picture of what I mean here: I do not...

Add event listeners to several map markers

javascript,google-maps,google-maps-api-3,google-maps-markers
I have the following function to set the Markers. function setMarkers(map, locations, contenido) { // Add markers to the map console.log(contenido); // Marker sizes are expressed as a Size of X,Y // where the origin of the image (0,0) is located // in the top left of the image. //...

Android SharedPreference Ghost Number?

android,google-maps-api-3,sharedpreferences
I am losing my mind, I am using shared preference to create google maps markers, and it is getting coordinates from a 2130 line long text document but something is really off, here is the coordinates it is getting around line 1982 06-16 23:23:10.072 22228-22228/com.emiliogaines.fuelfinder D/X:﹕ 12.0434 990 06-16 23:23:10.072...

How to implement centered marker in Google Maps API v3 with Ionic & Angular

javascript,angularjs,google-maps,google-maps-api-3,ionic
I have created a map in my Ionic project using Maps API v3 and ngCordova to get my current location and with the following code: var options = {timeout: 10000, enablehighAccuracy: false}; $cordovaGeolocation.getCurrentPosition(options) .then(function (position) { var myLat = position.coords.latitude; var myLong = position.coords.longitude; console.log(myLat, myLong); var center = new...

How can I display the full state/province instead of just the abbreviation when a user chooses an address in google autocomplete API.

c#,google-maps,google-maps-api-3
After a uses has selected a address, I am displaying a form so they can fix any issues in the address if necessary. The user chooses an address. The form is displayed so the user can modify the address if necessary. I want to display the full state/province instead of...

Google Maps MarkerClusterer show only one marker

javascript,google-maps,google-maps-api-3
My markers are generated from xml parser. Its working and showing eg 7 markers, but when I added MC then it shows only 1 marker. Check my js. Maybe it problem is here? markers.push(marker); ? function initialize() { directionsDisplay = new google.maps.DirectionsRenderer(); var chicago = new google.maps.LatLng(52.6145, 21.3418); var mapOptions...

GoogleMaps markers don't work

javascript,html,css,google-maps,google-maps-api-3
I'm trying to put three Google Maps markers on a website, but they don't work. I can't figure it out why. I've checked all over again, several times, but I'm a newbie and I can't find the problem. Here's my JS code <!-- Google Maps JS --> <script src="http://maps.googleapis.com/maps/api/js?sensor=false" type="text/javascript"></script>...

Touch events for google maps on mobile

javascript,jquery,google-maps,google-maps-api-3
In my app I am using google maps and I am creating locations on the maps once the user right clicks. I have this event doing the trick for me google.maps.event.addListener(map, 'rightclick', function (e) { if (checkDistance(e.latLng)) { if (viewModel.haveRolesToDoStuffOnProjectLevel()) { geocoder.geocode({ location: e.latLng }, function (result) { if (result.length...

How to update kml file/layer dynamically?

javascript,google-maps,google-maps-api-3,kml,parcel
I am using a kml file for displaying map with custom boundary lines. That kml file is downloaded from some website. In that file, inside the placemark tag there is no point tag for display icons. Eg: <Placemark> <name>Spot 2</name> <description>.....</description> <styleUrl>....</styleUrl> <MultiGeometry><Polygon><outerBoundaryIs><LinearRing><coordinates> ......... </coordinates></LinearRing></outerBoundaryIs></Polygon></MultiGeometry>...

Embed a Google Map into a dynamically created div

javascript,jquery,google-maps,google-maps-api-3
I'm trying to dynamically generate a Google map when the user submits a form, but the map does not appear in its div when the form is submitted. I tested to see if the map populates on merely on pageload and it does, but when trying to use a div...

Remove all markers, polygons, and event listeners from a Google Map

javascript,google-maps,google-maps-api-3
I have a Google Map created with Google Maps API 3 that has several markers, polygons, and event listeners. When I push a button, I want remove all those objects from the map, and then have it reload again with nothing. Is there a central function that can just reset...

Restricting panning to one globe in Google Maps API

javascript,google-maps,google-maps-api-3
I have a map created using the Google Maps API, and I'd like to restrict panning to one globe; by default you can pan continuously east/west, the map repeats endlessly. I'm trying to use henningj's solution posted to this question var allowedBounds = new google.maps.LatLngBounds( new google.maps.LatLng(85, -180), new google.maps.LatLng(-85,...

Google maps api kml filling incorrect

javascript,google-maps-api-3,kml
I have an simple HTML and simple KML file I ma trying to display in Google maps. The problem is the filling of the single polygon isn't working correctly. If you look at the example below, you can see the polygon is filled on the right side (which is correct...

Usage of Google Maps API Key v3

javascript,google-maps,google-maps-api-3,key,quota
I'm just starting with Google Maps API (GMA for short) and I came to understand it is good to have the GMA Key (GMAK for short) regardless of not being necessary IF you are not to set foot beyond the limit quota. It happens that I probably won't but that...

Google map v3 remove last line from poliline

google-maps-api-3
My script adds markers to the map. When I want remove the last I click back button http://tests.uk4u.pl/goomap/goomap_markers/ Everything works OK but I started something similar with poliline. After many possible changes of my code I cant achieve the same like with my markers. I want remove last line of...

Recalculate markercluster and downloadUrl

google-maps,google-maps-api-3,filter,markerclusterer
I am trying to fix the problem with out success. As you can see when you uncheck the VDSL or ADSL option the markercluster still having the same value. downloadUrl("php_to_xml.php", function(data) { var xml = data.responseXML; var markers = xml.documentElement.getElementsByTagName("marker"); for (var i = 0; i < markers.length; i++) {...

How to display a heatmap using dburles:google-maps Meteor package?

javascript,google-maps,google-maps-api-3,meteor
UPDATE: Code below is fixed as per accepted answer and is confirmed to be working. I'm a bit stuck with Meteor, please help me out. I've installed the dburles:google-maps package and got the map to show markers just fine. Then I tried to display a heatmap and it's causing an...

Creating a text input field precisely where a user clicks on a Google Map

google-maps,google-maps-api-3
Right now I have a Google Map which places a mapLabel that says "Hello!" wherever a user clicks (and binds it to that Lat/Long) This is done simply by google.maps.event.addListener(map, 'click', function(e) { placeLabel(e.latLng, map); }); and function placeLabel(position, map) { var mapLabel = new MapLabel({ text: 'Hello!', position: position,...

Google Map Marker setTimeout

javascript,google-maps,google-maps-api-3
I'm trying to incorporate this Google Map Marker setTimeout feature but unable to get everything working correctly with the below. I've put together a Plunkr, any suggestions would be helpful. Thank you. <script type="text/javascript"> function initialize() { var mapOptions = { zoom: 11, center: new google.maps.LatLng(-33.9, 151.2), styles:...

Google maps not working in Firefox (gray box)

javascript,google-maps,firefox,google-maps-api-3
I have a plugin I'm working on that uses the Google Maps API v3. Works like a charm, except in Firefox! I present to you the following URL: [REDACTED BECAUSE SOLVED]. You'll notice that if you're using firefox there is a gray box with google maps stuff available. If you...

Cant zoom in and out of google map

javascript,google-maps-api-3
I am trying to implement a google map on the site I'm working on. I copied a example from the google maps api site where you can overlay circles. The map loads fine but non of the controls work being: zooming in and out, panning the map as such. Does...

Google map infowindow position on custom marker

javascript,css,google-maps,google-maps-api-3
I'm not using the Markers in Google Maps because I wish to render custom text and images on my marker, so what I did is a custom marker using Overlays. The Overlay position is not exactly like the marker so I played a bit with it and now it is...

How to add a multiple marker to a moving location google map,Javascript

javascript,google-maps-api-3
I'm trying to make a function that adds a marker based on coordinates given to it,but its seems that the simple thing which adding a single position is not working,other than the current position marker to Google map,since the map is keep updating itself over and over the marker will...

Remove the tabindex the google maps in my page

javascript,google-maps-api-3
I need to remove the tabindex the map on my page. I used the code below but the tab passes through the markers on the map and the Google logo. var map = new google.maps.Map(document.getElementById('map'), mapOptions); //Remove o TAB do mapa google.maps.event.addListener(map, 'tilesloaded', function() { var mapContent = (document.getElementById("map")); mapContent('a').attr('tabindex',-1);...