Questions tagged [google-maps]

Google Earth is an innovative application and cutting-edge technology offered by Google, providing users with access to high-resolution satellite images, detailed street maps, and immersive Street View experiences. It also enables the integration of these maps into external websites through the Google Maps API, as well as serving as a convenient tool for locating urban businesses and various organizations across countless countries worldwide.

Changing Marker Color in Google Maps API

There are multiple Google Maps Markers colors based on certain conditions being TRUE or not. In addition, these Markers will change color when the mouse hovers over a division (a1,a2..ax). I want the Markers to revert back to their original color when th ...

Adding code containing various Google Maps elements in a fresh browser window using JavaScript

I've encountered an issue while trying to create a new page with a Google map and title based on the button clicked. Interestingly, when I copy/paste the HTML in the "newhtml" variable into an actual HTML file, it works perfectly fine. However, it does not ...

Angular - Javascript - Oops! The variable 'google' seems to have gone missing after reloading the page

For my website, I utilized Angular 2+ and integrated the Google Maps Api by adding the following code to my index.html file: <script async defer src="//maps.googleapis.com/maps/api/js?[myKey]&libraries=places"> </script> ...

Issue with Google Maps functionality within the jQuery easytabs platform

Upon clicking the contact tab, the gmaps loads but unfortunately only shows the left corner of the map. Quite intriguing... Any thoughts on how to fix this? Here is the corresponding jsfiddle This is the structure of my HTML code: <div id="menu-contai ...

Steps for setting up an info window on a Google map with multiple markers

I'm having trouble getting the infowindow to pop up on the multiple custom markers I added using AJAX on Google Maps. Everything was working fine before I tried implementing the infowindow and adding the listenMarker() function. The icons were in the ...

Ways to retrieve data from an Observable and save it in an Array categorized by a specific identifier

The data I have is structured as follows: Location: lat: 43.252967 lng: 5.379856 __proto__: Object customerId: "5cd430c65304a21b9464a21a" id: "5d5a99c62a245117794f1276" siteId: "5d0ce7c4a06b07213a87a758" __proto__: Object 1: Location: {lat: 43.249466, lng ...

Setting the borderRadius for a web view on Android Maps V3: A complete guide

In my application, I am using Android Map V3 and have encountered a bug specific to the Kit-Kat version. The chromium kit throws up an error message - nativeOnDraw failed; clearing to background color, which prevents the map from being displayed. Despite ...

Ways to iterate through a JSON formatted array variable using JavaScript

Below is my code snippet, used to plot all the locations fetched from my database onto a Google map. $.ajax({ url:"http://localhost/church_finder/index.php/MapController/search_church", type:'POST', data:{coordinat ...

Stop geocomplete from providing a street address based on latitude and longitude coordinates

Is there a way to prevent geocomplete from displaying the street portion of the address when passing lat and lng coordinates? Here's an example: If I pass these coordinates to geocomplete: var lat = '40.7127744' var lng = '-74.006059& ...

Turn off info windows for businesses and other points of interest, except for those within your own polygons on Google Maps

Is there a way to make only the infowindows attached to my polygons clickable on Google Maps? I don't want Points of Interests like Restaurants to have clickable infowindows. I tried changing the map style to hide business labels, but infowindows still a ...

When attempting to set a dynamic src tag for embedding a Google Map in a React application, an X-Frame-Options

I'm attempting to display a specific location using an iframe embed from Google Maps (shown below): <iframe width="100%" height="200" frameBorder="0" scrolling="no" marginHeight={0} marginWidth={0} id="gmap_c ...

What is the best way to locate the nearest marker using the Google Maps Direction Service?

Currently, I am engaged in the development of a Google Maps project where I am integrating markers retrieved from a database onto the map using the drawMarkers function. In addition to this, the Google Maps feature tracks your current location and refreshe ...

Using MongoDB and Pug/Jade templates with Google Maps API to display multiple markers in

I've been attempting to integrate map location data from my mongodb collection, but I've run into an issue where I can only access one piece of data at a time. I tried looping through the data both on the server-side and client-side to display it ...

Utilizing JSON Data for Dynamically Displaying Database Objects on a Google Map

After carefully reviewing the information provided in the initial responses and working on implementation, I am updating this question. I am currently utilizing the Google Maps API to incorporate a map into my Ruby on Rails website. Within my markets mode ...

The issue arises with the Google Map marker failing to function correctly when pulling data

I've recently started learning Google Maps. It's interesting that markers work and are displayed when statically declared, but not when retrieved from a database. // var markers = [[15.054419, 120.664785, 'Device1'], [15.048203, 120.69 ...

Interactive map navigation feature using React.js

Can someone help me figure out how to create a dynamic map with directions/routes? I am currently using the Directions Renderer plugin, but it only shows a static example. I want to generate a route based on user input. Below is the code snippet: /* ...

What methods can be used to extend the distance measurement with the help of Google Maps

I've searched online for the answer, but still haven't found it. I'm currently developing a website where users can search and select a location using the Google Geocoding API. Once the user chooses a place, I retrieve its bounds, but then I want to give ...

Display the closest locations on the Google Maps interface

I am currently working on a project that involves integrating Google Maps. The project includes storing hospital addresses (in longitude and latitude) in a database. However, I need assistance in displaying the nearest hospital from my current location. I ...

Is there a way for me to showcase the latitude and longitude retrieved from JSON data on a Google Map using modals for each search result in Vue.js?

After receiving JSON data with search results, each containing latitude and longitude coordinates, I am attempting to display markers on a Google map modal when clicking "View Map". However, the code I'm using is not producing the desired outcome. The JSO ...

Tips on how to automatically extract information (KMZ? JSON?) from My Google Maps

I am looking for a solution to automate the extraction of data from My Google Map without having to manually export it each time. Ideally, I want to streamline the process by integrating it into a larger script that runs smoothly without requiring me to lo ...

Tips for referencing Google Maps initialization in individual files within a website application

After setting up my Google Maps API snippet: <script async defer src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&callback=initMap"></script> in the index.html file, I encountered the error: Uncaught InvalidValueEr ...

When attempting to execute a function within another function in JavaScript, a ReferenceError is triggered

I recently developed a straightforward app that utilizes the Google Drawing Library (https://developers.google.com/maps/documentation/javascript/examples/drawing-tools) to allow users to draw circles on a map. The first circle represents the source locatio ...

Disallow/bound the position of the marker on Google Maps

Is there a way to restrict the placement of markers on a map? I am looking for a solution that allows me to limit the marker position within a specific area, such as a town, with a radius of 10km. It should prevent users from dragging or creating new mark ...

Adding markers to Google Maps for events

Greetings! I am currently utilizing the AngularGM library for my project, which can be found at https://github.com/dylanfprice/angular-gm. This library offers directives for Google Maps and markers. However, one limitation is that it does not support mar ...

Interactive Show Map with Autocompletion Feature

I attempted to implement autocompletion for my application and integrate it with Google Maps, but I'm encountering issues. The code for autocompletion is located in a separate JavaScript file called autocomplete.js. Since I already have a Google Map in m ...

Using the latitude and longitude data extracted from a MYSQL database using JSON in the Android platform, we can uniquely pinpoint and display markers on

I have retrieved a set of latitude and longitude values from a MYSQL DB in my Android app using JSON (obtained from PHP code). I am able to display these locations on a map successfully. However, I am struggling to figure out how to add markers to these lo ...

Find an element within an array in a separate JavaScript file (leveraging AngularJS)

I am new to AngularJS and decided to create a custom map with my own markers that I defined. To do this, I started by creating a JavaScript file containing an array: var myMarkers=[{ method1='..', methode2='..' },{ method1=&a ...

Enhance User Experience by Dynamically Updating Google Maps Markers with Custom Icons Using Django and JSON

Hey StackOverflow Community! I've been working on creating a web interface to showcase the communication statuses of different network elements. I'm almost done with the challenging part that I had been procrastinating. To add an awesome touch, I decided ...

Building a Material UI Dialog with Google Autocomplete for Search Suggestions

I recently encountered an issue while trying to integrate Google Autocomplete into my project. I am using material-ui v1.beta.12 as well. When I placed the text box outside of the Modal Dialog, everything worked perfectly fine. However, when I placed it i ...

Google Maps introduces a new feature that creates a blur effect on

Currently, I am utilizing the sample code provided below to superimpose an element on a Google map. <!DOCTYPE HTML> <html> <head> <title>Google Map Test</title> <style> html, body { margin: 0; ...

What is the best way to customize the default zoom level and position of a map in Google Data Studio?

Is there a way to customize the default zoom level and position of a map chart in Google Data Studio using JSON code? This is the JSON code that can be used for customization: [ { "featureType": "road.local", "stylers&quo ...

Notify of a specific value in an array that is retrieved through an AJAX request

I'm currently facing an issue with trying to display the value obtained from an ajax call. The code snippet below is functional in such a way that it will successfully alert the value of 'row' when grid.onClick is triggered. However, I am struggling to fin ...

Is there a method to prevent Google Maps from resizing when the DOM is altered?

I am currently facing performance issues with my Ionic app on Android. The opening animation for modals is slow, and after using Chrome timeline, I discovered that the Google Maps resizing and re-rendering process is causing lags in the modal animation. ...

Troubleshooting the Autocomplete Problem in Kendo UI AngularJS with ngMap

My current challenge involves attempting to combine the autocomplete feature of ngmap with Kendo UI. However, I am encountering an issue where the placeChanged event is not triggering and the autocomplete widget is not displaying. The input placeholder i ...

Focus Google Map on Selected Option using AngularJS

I'm attempting to center the map based on a selection in a drop-down select option box. Despite trying various examples, I haven't been successful in getting the map to recenter to the new latitude and longitude coordinates. I'd like to achieve this using ...

Limit access to Google Fusion Table to specific types of maps. Eliminate Google Fusion Table for selected map formats

Currently, I am in the process of creating a web map using the Google Maps Javascript API. My objective is to display a Google Fusion Table containing buildings in Boston exclusively on a stylized map named "Buildings." When I switch to the Buildings map t ...

Contrast between gmaps and traditional cross-domain AJAX queries

I am curious about the behavior of the getJSON method when making an ajax call to specific addresses. For example, when I make a call to "", no errors are generated. However, if I try to call an external domain that is not Google, the browser throws an e ...

Generating clickable markers that trigger an AlertDialog to appear in real-time

I am currently working on dynamically adding markers to a map, pulling data from JSON. The marker addition process is functioning correctly, as I can successfully add multiple markers in various locations. However, when I click on a marker, I want an alert ...

Loading Google Maps with Ajax

Exploring the world of google maps has been quite entertaining for me, however, I find myself in need of some assistance. The issue at hand involves a small block of HTML/Javascript that can be seamlessly integrated into a standard HTML page or loaded into ...

Issue encountered when retrieving a photo using the Places API: "Invalid JSON format detected at the start position."

Exploring the functionalities of the Google Places API has been my recent focus, however, I've encountered an obstacle that has me puzzled. While making API calls to a local proxy server, everything seems to be functioning well except when attempting to re ...

Python: fixing point displacement on google maps caused by the satellite image's angle interferance

Currently, I am utilizing the Google Maps static API to access top view satellite imagery of objects for which I possess surface coordinates (LoD1 / LoD2). It seems that the points are always slightly inaccurate, possibly due to a slight tilt in the satel ...

Error in IONIC 3: The code is unable to read the 'nativeElement' property due to an undefined value, resulting in a TypeError

I am currently learning about IONIC 3 and working on an app that utilizes the Google Maps API. However, when I try to launch my app, I encounter the following error message: inicio.html Error: Uncaught (in promise): TypeError: Cannot read property 'nativ ...

What steps can be taken to enable users to draw a path on a Google Map?

I'm working on a new project for a Facebook app that will allow users to map out their marathon route using Google Maps. I plan to utilize mySQL database records to store fixed points along the path (such as specific locations based on latitude and longitu ...

Disable location prompt feature when using AngularJS with Maps API

For my web application, I developed a feature that includes a map with custom markers using Angular loops: <map data-ng-model="mymap" zoom="4" center="[38.50, -95.00]" style="heigth:375px"> <div ng-repeat="item in list"> <marker pos ...

Having trouble retrieving coordinates from AJAX request to Google Maps API?

I am currently developing a weather application and one of the initial steps is to retrieve the longitude and latitude coordinates for a specific city based on its name. To achieve this, I am utilizing Google Maps API to gather the necessary information. ...

The Vue.js application is experiencing issues with displaying Google Maps functionalities

I have developed an application using Vue.js in Monaca and Cordova with onsenUI. My goal is to display my location on a Google map within the page. I attempted to achieve this by utilizing the npm package named vue2-google-maps, but unfortunately, it's not ...

Implementing a feature to dynamically add multiple markers on Google Maps

Currently, I am utilizing the .text() method to extract latng from the html. <div class="latlng"> -33.91722, 151.23064</div> <div class="latlng"> -32.81620, 151.11313</div> As a result, I am using $(latlng).text() to retrieve the ...

What are some tips for utilizing markers that display location values in the format of a bar chart on Google Maps?

Hey there, I have a project in mind to create a Google map with markers representing specific locations and their values displayed as bar charts. Here is the code snippet from my index page: --index.html-- <!DOCTYPE html> <html> <head ...

Implement a React Component as a unique OverlayView within the Google Maps application

Utilizing the Google Maps JavaScript API V3, I have created a map with clustered and draggable map markers. Instead of relying on React libraries that interact with the google maps API, we chose to build our own solution due to limitations in drag function ...

JavaScript asynchronous problem

When developing a simple Javascript function to validate user input for City and State, it encounters an issue with asynchronous behavior. The function checks if the user has entered values in the specified input fields and then proceeds to geocode the l ...

How can you extract path information from an SVG file and utilize it as a marker on Google Maps?

I want to implement a custom SVG icon as a marker on Google Maps. I have obtained this SVG file: <svg xmlns="http://www.w3.org/2000/svg" width="510px" height="510px" viewBox="0 0 510 510"> <g stroke="black" stroke-width="10" ...

Obtain the identification address for a group of items

I have a JSON object containing place IDs, and I am attempting to retrieve the corresponding addresses for each ID. This is the code snippet I'm using: <div id="places" class="places"></div> <script> function initialize() { j ...

Is there a way to compel Google Maps to load within my Angular application by implementing an Angular Directive?

I am encountering an issue where my Google Map fails to display most of the time. It seems that the map is not fully rendered when the rest of my data is populated in my Angular view. Is there a way to force the map to load? I have done some research and ...

The function d3.json() does not support googleoverlay

As a newcomer to coding, I am currently working on incorporating the code found at https://bl.ocks.org/mbostock/899711. Instead of using a local .json file, I have opted to read JSON data from a URL. However, I encountered an issue where the LAT and LONG v ...

Is there a way to trigger an alert once the google map has finished loading?

Is there a method to trigger a function once the Google map has finished loading? My website contains a Google map accessible through this link. The Google map on my site is powered by the Google API using the following URL: http://maps.googleapis.com/map ...

How to successfully load the google-map-react library

After installing the google-map-react library locally in my app, I verified that it is listed in my package.json under dependencies. The corresponding folder also exists in the node_modules directory. However, when attempting to reference the component con ...

Adding markers to a map in Angular 2 using ngOnInit after initialization

Embarking on my Angular journey by creating a sample app incorporating GoogleMaps. import { Component, Input, OnInit, Inject } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { FormControl } from '@ ...

Unable to retrieve Google Maps route on Android device

After discovering the route between two latitude and longitude values on Google Maps using "Get Directions," everything appears accurately. However, when attempting to use the same directions in an Android mobile application, only the destination marker ...

Difficulty with info window within a for loop

I am currently working on implementing multiple info windows for markers. I found an example on Stack Overflow that I am trying to follow. Despite not encountering any errors in the console, the info windows do not appear as expected when clicking on the m ...

The file_get_contents() function is unexpectedly returning false when provided with a correct URL

Currently, I am in the process of developing a geocoding PHP function that utilizes the Google Maps API. It seems like there is an issue with the file_get_contents() function returning bool(false), even though the URL I have encoded appears to be correct. ...

Add a React component to the information window of Google Maps

I have successfully integrated multiple markers on a Google Map. Now, I am looking to add specific content for each marker. While coding everything in strings works fine, I encountered an issue when trying to load React elements inside those strings. For ...

Mysterious AngularJS Error: An Unforeseen Encounter with [$injector:modulerr]

While following a tutorial on creating a MEAN stack project with Google Maps integration, I successfully completed the project without encountering any issues. However, when I returned to check on it later, I discovered that it was no longer functioning pr ...

Query: What is the best method for calculating the distance between various sets of latitude and longitude coordinates?

Exploring the idea of creating a LAMP web application that allows users to input their location. Considering integrating Google Map API to convert their locations into lat/long coordinates. Assuming every user has this information, I am looking for guidanc ...

What methods can be used to center a Google map on a specific location?

I am facing an issue with three map canvases on different divs. Despite setting the center to the same position in all three of them using JavaScript, the second and third maps do not seem to reflect that center. Does anyone have any insights on what cou ...

Moving the Google Maps zoom button to the top of the screen

I am looking to adjust the placement of my zoom panel slightly towards the top in the image provided. Any suggestions or guidance would be greatly appreciated. Thank you. <GoogleMapReact bootstrapURLKeys={{ key: `${process.env.REACT_APP_GOOGLE_MAPS_K ...

Setting up the current user's location when loading a map with Angular-google-maps

I am currently utilizing the library in conjunction with the IONIC framework. To manually set the center of the map, I have implemented the following code snippet: .controller('mainCtrl', function($scope) { $scope.map = { center: { ...

Having trouble getting two components to return in React

After successfully implementing the Hello World example by returning "Hello" and "world" from two different components, I encountered a problem with my code. In this specific code snippet, I am unable to return the Menubar component, although the Map compo ...

Understanding how to utilize environment variables in React.js can drastically improve

One of the key components in my project is using an environment variable like this: process.env.GOOGLE_MAPS_API This variable holds a Google API key which is crucial for rendering maps. However, I'm facing an issue with the following code snippet: expor ...

Access to a custom Google Map via an API connection

I currently have multiple custom Google Maps that I created using and they are all associated with my Google account. Is it possible to access these maps using the Google Maps JavaScript API? It seems like the API does not work with manually created maps ...

Utilize npm libraries within the main directory of Sage 8.5.3 theme

When attempting to add npm libraries in the root of Sage 8.5.3, I encountered an error in the console stating that 'require' was not found. var GoogleMapsLoader = require('google-maps'); GoogleMapsLoader.load(function(google) { ...

Error encountered when deploying mixed content

Currently working on a project and looking to deploy my dev server to firebase hosting. Encountered some Mixed Content errors in Chrome dev tools after deploying the app, indicating that I needed to switch certain source files from http to https. The erro ...

Ionic 2 encountered an error: A non-empty string argument was anticipated

My goal is to show markers on a map using the stored postcode in JSON format. I have successfully accessed the lat and long values from the JSON data to display markers on the map. However, when I attempt to use the postcode, it fails and returns an erro ...

An argument error in IE 8 caused by an invalid procedure call

Is there a way to access the opener's class in a child window created using window.open? This works smoothly in W3C browsers, but fails in IE 8. On the other hand, I tested using an iframe and it seems to work fine across all browsers. The main goal of thi ...

Position a div element on top of Google Maps to create a floating

Currently working on a website and attempting to add shadows over Google Maps by using a <div> element for a shadow effect: Unfortunately, the desired effect is not being achieved. This is the current CSS code in use: html { height: 100% } body ...

Converting longitude and latitude integers from Google history JSON to Google Maps format

When using the Google History JSON exported API, it returns two integers for latitude and longitude. The file structure is as follows: { "locations" : [ { "timestampMs" : "1525631885005", "latitudeE7" : 511052047, "longitudeE7" : 207459413, ...