Questions tagged [google-maps]
Google Maps is a desktop and mobile web mapping service application and technology provided by Google, offering satellite imagery, street maps, and Street View perspectives.
81
questions
22
votes
1answer
15k views
Simple Async Google Maps initializer with AngularJS
Here is a simple reusable AngularJS factory I came up with to initialize Google Maps Asynchronously, which somehow does not seem ...
10
votes
1answer
1k views
Python application to create Google Map image
I have written a Django app that would get some input and give you an image as output. The output image has 3 layers:
Google Map image
rosreestr (russian docs layer)
data from geojson layer
I hear ...
9
votes
2answers
27k views
Simple application for finding local restaurants
I was asked to create a test APK file by a company HR when I applied for an Android developers job,
Specification:
The goal is to develop a simple application which finds the local
restaurants. ...
8
votes
4answers
1k views
Generate points for smooth movement between two given points
This is one of the methods in a project for generating points between two given points. We add points of route with a 25ms delay in an array and a camera on Google Maps is always at the last point. So ...
8
votes
2answers
445 views
Function to find user's region based on GPS coordinates
I've made an algorithm/ function to get a user's region based on their GPS coordinates. It primarily looks for big cites and counties for the region and the state for the outer region eg. orange ...
7
votes
1answer
3k views
Excel VBA to parse JSON out of Google Maps API
Some code that I wrote and broke into 5 separate questions on stack overflow. Some guy wanted to query Google Maps receive some JSON and then for each result found within that JSON do another query. ...
7
votes
1answer
1k views
Spherical Voronoi diagram, binary splitting approach [closed]
EDIT: My code DOES not work, see https://gis.stackexchange.com/questions/294380/if-rectangle-corner-points-have-same-nearest-neighbor-does-whole-interior
Given 5 (currently hardcoded) cities, this ...
6
votes
2answers
1k views
My Google Maps Script
I've written a script with the Google Maps JavaScript API v3.
I've ran it through JSHint and everything seems to be valid.
I'm wondering if my script has room for improvement.
Any suggestions are ...
6
votes
2answers
3k views
Zip Code to City, State for registration form
Took me a couple of days (in between working on other projects) to get the code working, but now that I do have it working I would like to know if there is a way that I could make it work better, or ...
6
votes
1answer
4k views
Clustering markers on Google map on zoom
I have a method that is getting called when someone zooms camera on the map (Google map).
I recalculate the positions of markers of map and the code is clunky and not effective. I iterate over arrays ...
6
votes
2answers
8k views
Placing a Google map in Colorbox
I need to place a Google map in Colorbox overlay and am wondering if there's a better way to do this. I've just started out with Google's tutorial so there's nothing fancy going on.
Right now I'm ...
6
votes
1answer
711 views
Google Maps API latitude/longitude pair to Google Fusion Tables query
I'm trying to learn JavaScript, and as a practice tool I recently wrote a simple web app that uses the Google Maps API Geocoder to get the latitude and longitude of a location (user input), manipulate ...
6
votes
1answer
746 views
Bottlenecks in asynchronous JavaScript code for Google Map
I'm working on a pothole map web app in Google Apps Script. The map gets its data from a Google spreadsheet (from manual surveying), which is then transformed via hits to the Geolocation and Google ...
5
votes
2answers
1k views
Using JavaScript promises to display weather and location information
This is the first time I'm trying to use promises in JavaScript so I'm not sure if I have done it correctly, but it seems to work. The problem is that I have ended up with a "nested ...
5
votes
1answer
381 views
Geolocation check and error management for Google Maps
I've written this code that I've been using for a while now to check for browser geolocation services for Google Maps applications. I have to say that I am not very happy with it as I've had to hack ...
5
votes
2answers
824 views
Google Maps API with Jackson Parser
I am working on the Google Maps API, doing a reverse geocoding with the following code snippet.
What I am using are:
Spring
Jackson Parser
Google Maps API
It is working fine but it gives results a ...
5
votes
1answer
221 views
Google Maps buttons
This is the proof-of-concept code with drafts for widgets for my current project that uses Google Maps. As a result the code produces 3 buttons in the top right corner:
Any advice on how I may ...
4
votes
2answers
1k views
Object-oriented JavaScript and Google Maps objects memory management
I have to draw various instances of HeatMaps, Winds and Polylines. Each layer will have one <...
4
votes
2answers
126 views
Find SuburbName from latlong or location
I have create one class and interface for finding SuburbName based on Location or LatLong coordinates.
My interface
...
4
votes
1answer
704 views
My Google Maps Script v3
My Google Maps Script v2
I re-factored my code to be more OO.
Does it have any more room for improvement (naming, readability, oop, etc.)?
I'm importing Gmap.js ...
4
votes
1answer
742 views
Wrapper library for Google Static Maps API
I've recently read the books Clean Code and Effective Java.
I am a huge fan of Object-Oriented Java.
I am trying to write as professionally as possible. I have been an Android Developer for 20 months ...
4
votes
0answers
1k views
Sanitize and standardize street addresses using Google Maps lookups
Take in incomplete user input street addresses, clean it, segregate based on word count and run it into Google maps places api and output completed & standardised addresses based on Json object ...
4
votes
0answers
91 views
Simplified Google Maps program
I've been trying to write a simplified Google Maps program. My programming experience is limited. I have come up with a solution but I'm looking to make it more user friendly by splitting it up into ...
3
votes
1answer
247 views
Polygons on Google Maps
I have Polygons on Google Maps API V3, and I would like to write this shorter:
...
3
votes
2answers
675 views
Adding markers to a Google Maps map from a source
I decided to make a simple project to learn the Google Maps API. I'd appreciate a review of the code below. I'd like to know what I did right and wrong.
The code pulls data from one source and adds ...
3
votes
1answer
386 views
3
votes
1answer
3k views
Display multiple polygons on Google Maps and toggle visibility of each polygon
I want to display multiple polygons (with the co ordinates either given by the user or pre-defined) on Google Maps and to toggle the visibility of each polygon. I wrote the code to display multiple ...
3
votes
1answer
3k views
Drawing multiple polygons in Google Maps in the same style
To multiple Polygon objects in Google maps, I have to set same strokeWeight, fillColor and fillOpacity attributes. Is there a way how to add these only once or do it in a better way?
...
3
votes
1answer
5k views
Multiple Google Maps using V3 API
I have several Google Maps on one page and each has its own set of Lat/Lng co-ordinates. As a result I have added in the JavaScript options for each one individually as follows:
...
3
votes
1answer
3k views
Google Maps JavaScript API v3: Sorting Markers with Check Boxes
Recently I built a map with custom markers (pins) and a sorting function to display each by type (Member, Supplier, Prospect, New Member).
The HTML (check boxes wired up with ...
3
votes
2answers
560 views
Plotting JSON locations using Google Road API with Javascript Promise chaining
I wrote this code for an personal application, just to help me visualize some data related to driving. I have one JSON on my machine, this JSON contains a set of locations (lat, lngs) and every ...
3
votes
1answer
34 views
Turning on/off setInterval locating - using React.js
I work with the GoogleMaps API, using React.js.
Inside the GoogleMap component:
I have a ...
3
votes
2answers
331 views
My Google Maps Script v2
My Google Maps Script v1
Using the Google Maps JavaScript API v3.
Does my script have any room for improvement (naming, readability, oop, etc.)?
I'm going to pair it with some live time ...
3
votes
1answer
793 views
Hover on list items to change map marker styling
I'm struggling to make a React/JS map I have more efficient. Essentially, I have a list of cards, and then a map of markers. When I hover on one of the cards, it changes the styling of the marker.
...
3
votes
1answer
232 views
Google Maps geocoding lookup function
In an effort to keep all of the Google Maps Javascript API in it's own little world, I have created a googleMaps object that will contain all of the functions that directly make google maps webservice ...
3
votes
1answer
842 views
Displaying a Google map with multiple complex markers and unique info windows
This JavaScript file is part of a large Ruby on Rails app. Any feedback is appreciated.
Update 3.7.16: as per @Jonah's suggestion, here's a description of the code's purpose:
I've built a bus-...
3
votes
1answer
106 views
Geocoding library
I've written a Geocoding library that is hosted on Github. It has got 7.9 rating by the scrutinizer. I've checked and the only thing that I think I can improve is ...
3
votes
1answer
281 views
Entering address details into Google Maps geocoder
I have a Google Maps Geocoder and I am looking to refactor it. The user enters address details into a form where at the bottom there is the option to show on map.
First the map is hidden
The user ...
3
votes
0answers
516 views
Looping through Parse.com queries
Here's my JavaScript file that queries data from Parse and then updates my Handlebars.js template to display them. The code has 3 async calls using a Promise. It still feel like it could be improved, ...
2
votes
2answers
671 views
Get JSON script code with pushing to heatmap
I have a script that makes a database call and then filters the results. After filtering it pushes it to an array and shows it on a map.
Here is my function:
...
2
votes
1answer
90 views
Placing many pins on a Google Map
It's taking almost 2 minutes to load all the pins on this Google Maps API. Every time the page is loaded it sends a request for each location one by one. Can it do this all at the same time or preload ...
2
votes
1answer
11k views
Adding events to multiple markers in a Google map
I was looking over questions related to setting up markers on a Google map, and though the following works perfectly fine for me, it was different from the other (and accepted) answers. I just wanted ...
2
votes
1answer
204 views
Adding pins onto a Google map
I have the following block of code which adds pins including descriptions and links onto a Google map. How can I refactor it so that I can add pins easier and without so much redundant code?
...
2
votes
1answer
284 views
Displaying multiple Google Maps markers on a Visualforce page
I hope this is the right board for this. I am a novice programmer and I am trying to learn how to write better code. I have a visualforce page with a very long Javascript script in the middle of it to ...
2
votes
1answer
143 views
Google maps API code
I have inherited a site which uses the Google API to create a map on my webpage. I don't know much about JavaScript but from the research I've done, I dont think this code is optimal as it is not ...
2
votes
2answers
2k views
Address geocoder
If you notice, there are variables of street_address, route, intersection re-used in the ...
2
votes
1answer
63 views
Avoid global variable for callback function called by function with no arguments
My website has multiple pages that use the Google Maps api. Each page uses a different part of the api (e.g. autocomplete, displaying markers etc). However, every page needs to call the initMap() ...
2
votes
1answer
43 views
Google Maps marker management for games
Is there a better way to design this code? I have read that too many function parameters is a sign of poorly design code, and would love some feedback on this code.
The functions Google Maps markers ...
2
votes
1answer
344 views
Ivory google map facade
I want to simplify this process of creating map, putting markers on it according to Place objects from my database, creating info windows. Using egeloen/ivory-...
2
votes
1answer
185 views
geoInput jQuery Plugin
I made my first jQuery plugin, and was hoping to get a review. I'm especially interested in comments on whether I went about building up my html and applying the css in a reasonable manner (I chose to ...