google-maps-api-3

iPhone - Disable UIWebView from prompting to enable location services

旧巷老猫 提交于 2020-01-06 02:53:31
问题 During the development of my iPhone app, I decided to integrate Google Maps by including a UIWebView with a URL I construct pointing to maps.google.com. The problem is that the website tries to get the user's location, displaying the "This app wants to use your location". This creates a number of issues for me, which I can explain if necessary. Is there any way to disable the UIWebView / Mobile Safari from asking for the user's location. The only workaround I can think of is to use Google's

use Google geocode to return street name and list of house numbers using php

不想你离开。 提交于 2020-01-06 02:41:11
问题 I have a registration form that I would like to fill with data when a user arrives on this section of the form. The first part of the form asks for the postcode/zip code. On the form load I would like to be able to display a list of house numbers with the street name. This is what I have to return the data <?php $postcode = 'DH90ER'; $geourl = file_get_contents("http://maps.googleapis.com/maps/api/geocode/json?address=$postcode&sensor=true"); $array = json_decode($geourl,TRUE); print header(

Add text to Google Maps

自古美人都是妖i 提交于 2020-01-06 02:20:37
问题 How can I add text or hyper-links to the bottom right of Google Maps when using API V3. That is, add text or hyper-links next to "Map data (c)2014 Google" shown in the screen shot below. Here is my code: <!DOCTYPE html> <html> <head> <title>EC Bus Locations</title> <meta name="viewport" content="initial-scale=1.0, user-scalable=no"> <meta charset="utf-8"> <style> html, body, #map-canvas { height: 100%; margin: 0px; padding: 0px } </style> <script src="https://maps.googleapis.com/maps/api/js?v

Distance between two locations

痞子三分冷 提交于 2020-01-06 02:16:08
问题 <html> <head> <script src="http://maps.googleapis.com/maps/api/js"></script> <script type="text/javascript"> function showMap() { var directionsDisplay = new google.maps.DirectionsRenderer(); var directionsService = new google.maps.DirectionsService(); var map; var mapProp = { mapTypeId : google.maps.MapTypeId.ROADMAP }; map = new google.maps.Map(document.getElementById("googleMap"), mapProp); directionsDisplay.setMap(map); directionsDisplay.setPanel(document.getElementById('textDirection'));

Android Google Map V3 PolyLine cannot be drawn

你。 提交于 2020-01-06 01:52:09
问题 Getting this error while trying to match PolyLine on Google Map java.lang.NullPointerException: Attempt to read from field 'float com.google.android.gms.maps.model.PolylineOptions.c' on a null object reference This is the line mentioned in Logcat at testappmapv2.PathGoogleMapActivity$ParserTask.onPostExecute(PathGoogleMapActivity.java:208) googleMap.addPolyline(polyLineOptions); This is my Activity Code: import android.app.AlarmManager; import android.app.PendingIntent; import android.content

Unclickable fill in Circle?

拈花ヽ惹草 提交于 2020-01-05 10:32:19
问题 I have a mousemove event in my map and now I want to draw a circle with just the stroke line. var circle = new google.maps.Circle({ strokeColor: '#0000FF', strokeWeight: 2, fillOpacity: 0, map: map, center: new google.maps.LatLng(lat, lon), radius: 100 }); The problem is that the transparent fill center of that circle is still "capturing" the mouse event so it doesn't go to my Map mousemove listener. Is there any way to really set the circle fill center to transparent as in: transparent color

Google Map: How can I select multiple markers, which I imported, by clicking or drawing a shape around them?

我只是一个虾纸丫 提交于 2020-01-05 10:13:12
问题 I created a map with Google Map Maker. I did so by imported 5 different Excel files that had address fields and saved them all as different layers. The map now has about 500 addresses which are marked with pins that are color coded to the layer they belong with. Is there anyway I can either use the "Draw Line" tool or another means to select a group of those markers/pins? Ideally I am envisioning being able to draw a shape around them and then being able to select those address to save them

how to remove google geocode on click

南楼画角 提交于 2020-01-05 09:36:04
问题 I am using google maps- directions and geocoding. The geocode places a marker when the page loads. Is it possible to have this marker removed when a user clicks the submit button? Here is the code: var address = document.getElementById("address").textContent.replace(/\n/g, " "); geocoder.geocode( { 'address': address}, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { map.setCenter(results[0].geometry.location); var marker = new google.maps.Marker({ map: map, position

Determine if location is within a certain region in Google Map

扶醉桌前 提交于 2020-01-05 09:34:27
问题 In the Google Map shown above, there are 2 markers pointed by green arrows. They are the centers of 2 different regions indicated by blue circles in dotted lines. The marker pointed by an orange arrow lies within one of the aforementioned areas. This brings up a problem. Suppose there is a long list of locations of region center in the database, and all regions have the same fixed radius. How can I implement the computation such that the system can tell me whether an arbitrary location on

Determine if location is within a certain region in Google Map

99封情书 提交于 2020-01-05 09:34:24
问题 In the Google Map shown above, there are 2 markers pointed by green arrows. They are the centers of 2 different regions indicated by blue circles in dotted lines. The marker pointed by an orange arrow lies within one of the aforementioned areas. This brings up a problem. Suppose there is a long list of locations of region center in the database, and all regions have the same fixed radius. How can I implement the computation such that the system can tell me whether an arbitrary location on