google-maps-api-3

How do i get the coordinates of all four corners of a Rectangle?

丶灬走出姿态 提交于 2020-01-04 06:39:48
问题 How can i retrieve OR calculate the coordinates of the NW or SE corners of a Rectangle? I'm using Google Maps API v3 and I know there is the getBounds() method which returns the NE and SW coordinates of the rectangle. I need all four coordinates because KML 2.2 does not have a rectangle schema spec, it only has the polygon schema and i need to be able to export my rectangle into a kml as a polygon. 回答1: NW coordinates - (x1, y1) SE coordinates - (x2, y2) NE coordinates - (x2, y1) SW

Assistance needed - Map does not load properly in JQuery UI Tabs - NOT A DUPLICATE [duplicate]

我与影子孤独终老i 提交于 2020-01-04 05:57:41
问题 This question already has answers here : Problems with Google Maps API v3 + jQuery UI Tabs (17 answers) Closed 6 years ago . None of the "Answers" from the other post resolve my issue. Please Read My Post and Attempt to guide me in the right direction EDIT - EDIT - EDIT I have updated the java script to include the recommended function I have included the HTML here for those who do not like jsfiddle I have read tons of questions and answers here and I cannot get my Google Map to load properly

jQuery Mobile 1.0.1 Google Maps doesn't show the map first time after Reload Refresh works

谁都会走 提交于 2020-01-04 05:41:08
问题 My problem is everytime i open the website; first time the map doesn't show up, after a reload/refersh it works and shows the map. Here is my google maps code: <script type="text/javascript"> var map; var infowindow; function initialize(position) { //var pyrmont = new google.maps.LatLng(48.195201,16.369547); var pyrmont = new google.maps.LatLng(position.coords.latitude,position.coords.longitude); map = new google.maps.Map(document.getElementById('map'), { mapTypeId: google.maps.MapTypeId

Google Maps Geocoder: Return postal_code

寵の児 提交于 2020-01-04 05:16:14
问题 I'm using Jquery UI to autocomplete search for an address using Google Maps Geocoder, and when an address is selected it returns the geocode information. Here is the snippet: $('#address-dropdown').autocomplete({ //Use geocoder to fetch lat+long values from an address input using google maps API source: function(request, response) { geocoder.geocode( {'address': request.term }, function(results, status) { response($.map(results, function(item) { return { label: item.formatted_address, value:

How to get id of Marker clicked in Google Map inside setOnInfoWindowClickListener

旧巷老猫 提交于 2020-01-04 05:09:12
问题 Here what I am trying to do is set Id inside doInBackground and call it in setOnInfoWindowClickListener .But the problem is that it is getting the Id of the first element in the list. What I want is to get Id of Marker which is clicked. I am using a variable private static String id; To store id product.id=productJSON.getString("ID"); like this id=product.id; then assign it. googlemap.setOnInfoWindowClickListener(new OnInfoWindowClickListener() { @Override public void onInfoWindowClick(Marker

Why doesn't the google maps tutorial work on my pc?

六眼飞鱼酱① 提交于 2020-01-04 03:57:09
问题 So I've downloaded a sample bit of code from the google developer website to play around with. The bit of code found below is exactly the same as the code found here. When I download the html and try to open it locally in chrome it doesn't show anything, it returns me a blank screen without any errors (firebug lite). I'm using a mac and I'm new at all this web dev stuff. Should I set up a localhost thing or am I completely missing something? Any help is greatly appreciated. <!DOCTYPE html>

Load Google Maps JS API in component [Angular]

混江龙づ霸主 提交于 2020-01-03 16:49:33
问题 How is it possible to load an external js file, from a url in an Angular component? To be specific, I'm trying to load google-maps-api to my angular project. Currently, I'm doing it in my index.html like this: <script async defer src="https://maps.googleapis.com/maps/api/js?key=API_KEY&callback=initMap"> </script> Note: I'm aware of angular-maps . That's not an option. 回答1: A solutionis to create the script tag dynamically in ngAfterViewInit() import { DOCUMENT } from '@angular/common'; ...

Load Google Maps JS API in component [Angular]

£可爱£侵袭症+ 提交于 2020-01-03 16:49:16
问题 How is it possible to load an external js file, from a url in an Angular component? To be specific, I'm trying to load google-maps-api to my angular project. Currently, I'm doing it in my index.html like this: <script async defer src="https://maps.googleapis.com/maps/api/js?key=API_KEY&callback=initMap"> </script> Note: I'm aware of angular-maps . That's not an option. 回答1: A solutionis to create the script tag dynamically in ngAfterViewInit() import { DOCUMENT } from '@angular/common'; ...

getpaths() polygons google maps api

我们两清 提交于 2020-01-03 14:37:42
问题 I am attempting to retrieve the latlng coordinates of both a polyline and polygon. After I complete the drawing of either object I would like to store the latlng in a database, but for now I am merely trying to show the latlng in a textarea. I have done this easily enough for markers, rectangles, and circles, but the terminology for polylines and polygons is baffling me. When I complete the drawing i use an addDomListener(drawingManager, 'polygoncomplete', ... for polyons and then iterate

Remove indoor maps from styled Google Maps

百般思念 提交于 2020-01-03 13:11:53
问题 I'm trying to make a styled google map with just the Boston subway lines, land, and water. I set the visibility of everything to off, but some buildings are still showing up, and it looks like its only buildings with indoor maps. Here is my code: <html> <head> <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?sensor=false"></script> <script type="text/javascript"> var lat = 42.3581; var long = -71.0636; google.maps.visualRefresh = true; function initialize() { var