google-maps-api-3

Server-side checking of a point's existence inside a polygonal area using Google Maps API v3

爷,独闯天下 提交于 2019-12-22 20:30:26
问题 The logic is: user is editing an existing polygonal area of which extreme points are stored in the database. After editing the modified co-ordinates are updated in the database. Now I need to find whether a certain point exists inside the modified polygon or not. For that I'm assuming I have to do the server-side checking. The client-side checking is easily done by javaScript and that I've done already. The real problem I'm having is to check this on the server-side. Any suggestions? 回答1: I

Find all parks for a given zipcode with google maps

心不动则不痛 提交于 2019-12-22 20:09:30
问题 I'm trying to use the Google maps geocode API to return all parks for a given zip code. It seems that if I have a park name I have no problem returning the data. Such as http://maps.googleapis.com/maps/api/geocode/json?address=Kerry+Park+98122&sensor=false However, if i search for parks for a zip code http://maps.googleapis.com/maps/api/geocode/json?address=Parks+near+98122&sensor=false I get any result for the zip code with parks in the address. I tried using lanlng but that has the same

Google Maps - Getting the info window to show?

最后都变了- 提交于 2019-12-22 18:01:46
问题 I've currently got a Google Map showing successfully and it looks like this: I want it to show with the info window showing by default, like this example: I read this page: http://code.google.com/apis/maps/documentation/javascript/overlays.html#InfoWindows but that seemed to only explain how to make an info window with your own custom content. I just want to show the info like the example above where you see on many sites. 回答1: You can use the Places API: http://code.google.com/apis/maps

Method to calculate distance between two points [duplicate]

久未见 提交于 2019-12-22 18:00:21
问题 This question already has answers here : Closed 6 years ago . Possible Duplicate: Calculate distance between two points in google maps V3 Which one is best method to calculate the distance between two points using Google Map V3 API? Using Google's Distance Matrix computeDistanceBetween() method which is defined in google.maps.geometry.spherical namespace. 回答1: (#2) computeDistanceBetween() returns the straight line distance, to get the driving distance, use either (#1) the Distance Matrix or

Use Feature ID from Google Maps url in Google Maps API

流过昼夜 提交于 2019-12-22 17:58:09
问题 If a place is selected on Google Maps, either from the map itself or from the dropdown in a search, on Google Maps, the url looks like this: https://www.google.com/maps/place/Starbucks/@55.6767263,12.5666291,17z/data=!3m1!4b1!4m2!3m1!1s0x4652530e00cbee81:0x5e1ce2a9639f9705 After reading this blog article about the URL parameters, the /data part contains a wide range of information, among them is the Feature ID of the selected place. From the url example it's 0x4652530e00cbee81

How to Control Zoom Level Based on Windows Size In Google Maps

雨燕双飞 提交于 2019-12-22 17:54:59
问题 I am trying to create a responsive Google Map using Bootstrap.Here is a sample of what I did till now . What I need to do is setting a method to control the map's zoom level based on the windows size.For example as when as user re-size the map the map start zooming out and zooming in on the other way! Can you please let me know if this is possible and how I can do it? var map; var panorama; jQuery(function($) { $(document).ready(function() { var latlng = new google.maps.LatLng(49.241943,-122

Google Maps: Applying Event Listeners

夙愿已清 提交于 2019-12-22 17:51:38
问题 I need to keep track of coordinates of drawn shapes while using Google Maps drawing mode. I can add event listeners once a shape is drawn (e.g. polygon) to log the given ID and coordinates in both click and dragend events, but they won't work when editing the shape (e.g. insert_at , remove_at , set_at ). var shapeID = 1; google.maps.event.addListener(drawingManager, 'polygoncomplete', function(polygon) { drawingManager.setDrawingMode(null); polygon.setOptions({ id: shapeID, editable:true,

Function calls within InfoWindows

天涯浪子 提交于 2019-12-22 15:05:16
问题 Often I have maps with a whole lot of markers (let's say representing shops). I have infowindows that display basic info on the shop represented by the marker, then, on the infoWindow HTML I like to put a button that, for example, says "Details". The html of the infowindow is simple.. the html of the info window would include an input type="button" value="Show More" onclick="showMore(' + shopId + '); The relevant shopId would be obviously different for every marker... The problem is that the

Function calls within InfoWindows

旧时模样 提交于 2019-12-22 15:03:07
问题 Often I have maps with a whole lot of markers (let's say representing shops). I have infowindows that display basic info on the shop represented by the marker, then, on the infoWindow HTML I like to put a button that, for example, says "Details". The html of the infowindow is simple.. the html of the info window would include an input type="button" value="Show More" onclick="showMore(' + shopId + '); The relevant shopId would be obviously different for every marker... The problem is that the

Tweet button and infoWindow

我的梦境 提交于 2019-12-22 14:05:32
问题 I want to integrate Tweet button into a Google Maps v3 infoWindow (infoBox), with I have no success. Of course the script I use works on a simple page. I set up the twitter's js in my template file, added anchor to the html variable in the gmaps javascript file: ... Tweet ... What now can be see is only the "Tweet" text if I hover over the anchor link, and no Tweet grapic button is visible. If I click on this button, Twitter site loads but shares nothing. With Facebook Like button I had to