maps

Google Maps Android API: SupportMapFragment vs MapFragment

匿名 (未验证) 提交于 2019-12-03 01:31:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I read through the google maps API documentation and under MapFragment, it advises to use the class only when targeting API 12 and above. Then I assume that SupportMapFragment targets API 11 and below, though google didn't explicit mention it in the documentation. Then what if I want to target a wide range of API lvl? Does SupportMapFragment also targets API above 11? 回答1: Then I assume that SupportMapFragment targets API 11 and below, though google didn't explicit mention it in the documentation. SupportMapFragment is for use with the

How does this Google Maps zoom level calculation work?

匿名 (未验证) 提交于 2019-12-03 01:29:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I know what the input and outputs are, but I'm just not sure how or why it works. This code is being used to, given a min and max longitude/latitude (a square) that contains a set of points, determine the maximum zoom level on Google Maps that will still display all of those points. The original author is gone, so I'm not sure what some of these numbers are even for (i.e. 6371 and 8). Consider it a puzzle =D int mapdisplay = 322; //min of height and width of element which contains the map double dist = (6371 * Math.acos(Math.sin(min_lat / 57

Parsing Google Geo API (Reverse Geocoding) with jQuery

匿名 (未验证) 提交于 2019-12-03 01:29:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm sure I'm not the only one, but I cannot parse/return anything when jQuery takes a request to lookup an address when the data being requested is the latitude and longitude so Google can return the data, but it cannot be read by jQuery? http://maps.googleapis.com/maps/api/geocode/json With parameters: latlng=51.276914,1.077252 &sensor=false In Firebug it says 200 OK but nothing is displayed in the response: I can see it when I open it: http://maps.googleapis.com/maps/api/geocode/json?latlng=51.187296,1.229086&sensor=false&_=1302084865163

Google Maps API: initMap() is not a function

匿名 (未验证) 提交于 2019-12-03 01:27:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm working with Flickr's API. I am asynchronously loading some images and related metadata. I have a script where I do all this, using three AJAX calls: $(document).ready(function() { var latLon = { lat: 38.736946, lng: -9.142685 }; var numero = 10; var clicked = 1; $("#sq").click(function() { clicked = 1; }); $("#lg-sq").click(function() { clicked = 2; }); $("#thumb").click(function() { clicked = 3; }); $("#small").click(function() { clicked = 4; }); $("#mid").click(function() { clicked = 5; }); $("#apagar").click(function() { $("#results"

How to set Google API key restriction - HTTP referrers

匿名 (未验证) 提交于 2019-12-03 01:26:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Google API key restriction - HTTP referrers I put my Azure website url xxxx.scm.azurewebsites.net there but doesn't work (Google Places API Web Service stops working). localhost:44300 doesn't work either. I have to set key restriction to 'None', then Google Places API Web Service will work. What did I do wrong? 回答1: Web Service is supposed to be executed on backend servers, so the correct restriction for web services is IP restriction. HTTP referer restriction is used for client side services like Google Maps JavaScript API, it won't work

Using Google maps API v3 how do I get LatLng with a given address?

匿名 (未验证) 提交于 2019-12-03 01:25:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: If a user inputs an address, I want to convert to the equivalent LatLng. I've read the documentation, and I think I can use the Geocoder class to do this, but can't figure out how to implement it. Thanks for any help! 回答1: There is a pretty good example on https://developers.google.com/maps/documentation/javascript/examples/geocoding-simple To shorten it up a little: geocoder = new google . maps . Geocoder (); function codeAddress () { //In this case it gets the address from an element on the page, but obviously you could just pass

Google Maps Fragment returning null inside a fragment

匿名 (未验证) 提交于 2019-12-03 01:25:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: So I have an empty fragment that contains a map fragment. Whenever I try to activate the fragment containing the map, my app crashes and returns a null pointer error on this line: map = ((MapFragment) getFragmentManager().findFragmentById(R.id.map)) .getMap(); Full Error message: java.lang.NullPointerException: Attempt to invoke virtual method 'com.google.android.gms.maps.GoogleMap com.google.android.gms.maps.MapFragment.getMap()' on a null object reference at com.collusion.serviceassistant.ReturnVisitDetails.onViewCreated(ReturnVisitDetails

How can I integrate Google Maps APIs inside an Angular 2 component

匿名 (未验证) 提交于 2019-12-03 01:25:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I have an Angular 2 component that is defined in the file comp.ts in this way like this: import { Component } from 'angular2/core' ; @component ({ selector : 'my-comp' , templateUrl : 'comp.html' }) export class MyComp { constructor (){ } } Because I want the component to show a google map, I have inserted in the file comp.html the following code: This code has been copied from this link http://www.w3schools.com/googleAPI/google_maps_basic.asp . The problem is that the component doesn't show the map. What have I done wrong? 回答1:

Google Maps API warning: NoApiKeys

匿名 (未验证) 提交于 2019-12-03 01:25:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I've been using Google Maps API v3 for some time without an API key, and it worked well. It still works, but I get a warning in the console: Google Maps API warning: NoApiKeys https://developers.google.com/maps/documentation/javascript/error-messages#no-api-keys I include the script the standard way: And google.maps.version indicates that I'm using 3.24.2. In the Google documentation I can only see the different ways to obtain a key, but there is no indication if it's required or not. I noticed the warning today and I'm quite sure it didn't

ApiNotActivatedMapError for simple html page using google-places-api

匿名 (未验证) 提交于 2019-12-03 01:25:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to create a simple html page (I'd later like to add an autocomplete input there) that include google-places-api. I have an api-key (which is enabled) but I still get an error message. Here is my html- test but I get this error message- and in the console I get - Google Maps API error: Google Maps API error: ApiNotActivatedMapError I can't understand what the problem is.. Appreciate anybody's help 回答1: To enable Api do this Go to API Manager Click on Overview Search for Google Maps JavaScript API (Under Google Maps APIs ). Click on