maps

How to get a click event when a user clicks a (business) place on the map

匿名 (未验证) 提交于 2019-12-03 01:23:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I know how to set a click event on a map, and it works fine when clicking random locations. But when I click a business place, Google Maps will display the balloon containing the information about the business, but not raise the click event to my JavaScript. You can see this happing on this geocoding demo ( http://rjshade.com/projects/gmaps-autocomplete/ ). Browse the map to some city and click a random location: the address is displayed in the text box (Hurray!). Now find some business place and click that: the map pops up the balloon, but

mapFragment.getMapAsync(this) - NullPointerException

匿名 (未验证) 提交于 2019-12-03 01:23:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I am using com.google.android.gms:play-services-maps:7.5.0 version of Google Maps services. When trying to call the below I get java.lang.NullPointerException: Attempt to invoke virtual method 'void com.google.android.gms.maps.SupportMapFragment.getMapAsync(com.google.android.gms.maps.OnMapReadyCallback)' on a null object reference . @Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { SupportMapFragment mapFragment = ( SupportMapFragment ) getActivity ().

Why isn't this an instance of map of google.maps.Map? InvalidValueError: setMap: not an instance of Map;

匿名 (未验证) 提交于 2019-12-03 01:23:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am getting the error Assertion failed: InvalidValueError: setMap: not an instance of Map; and not an instance of StreetViewPanorama on a google map web page. I then read this question elsewhere here on Stack Overflow which told me I need an instance of the google.maps.MAP object. I thought that by calling that object in order to initialize the map that I would be calling that object. Previously, I got the error i is not defined so I moved the createMarker function into the $.getJSON function where it has local scope. Do I need to call

Debug source maps loading on Chrome

匿名 (未验证) 提交于 2019-12-03 01:22:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I generate source maps for javascript files during minification. The map files are referenced using a relative URL from the minified JS files that sit next to the map files. Here is an example comment at the end of app-e47a6637.js : //# sourceMappingURL=app-e47a6637.js.map The source map resolution works as expected in Firefox. However, Chrome does not load the map files. Additional information: JS source maps are of course enabled in the settings. I tried putting a proxy between Chrome and the server. Chrome does not even request the map

Convert this from Google Maps API v2 to v3

匿名 (未验证) 提交于 2019-12-03 01:22:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: This works on Google Maps API v2, now how do I convert this to API v3? Thanks // - Radar 1 Overlay Tiles var radar_layer= new GTileLayer(new GCopyrightCollection(""),1,17); radar_layer.getTileUrl=function(tile,zoom) { var llp = new GPoint(tile.x*256,(tile.y+1)*256); var urp = new GPoint((tile.x+1)*256,tile.y*256); var ll = G_NORMAL_MAP.getProjection().fromPixelToLatLng(llp,zoom); var ur = G_NORMAL_MAP.getProjection().fromPixelToLatLng(urp,zoom); var dt = new Date(); var nowtime = dt.getTime(); var tileurl = "http://mesonet.agron.iastate.edu

Google maps api REQUEST_DENIED when using API restrictions & key

匿名 (未验证) 提交于 2019-12-03 01:20:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I have been happily using the Geocoding API from Maps for some years, with no problem. Recently I've made more keys, for different environments, and decided it would be a good idea to add API restrictions to them. When I add these API restrictions, I suddenly start getting REQUEST_DENIED. https : //maps.googleapis.com/maps/api/geocode/json?latlng=={lt},{ln}&key={key} This IP , site or mobile application is not authorized to use this API key , ... REQUEST_DENIED Removing them allows the APIs to be called again. This is the setup for

Android Google Map to show as picture

匿名 (未验证) 提交于 2019-12-03 01:18:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I've implemented Google Maps V2 in my android app and now I would like to do something differently. I'm showing a location (longitude, latitude) with a marker. The problem is that this is showing in my activity as a Map. I would like to show it as a ImageView and only if someone clicks on it show the map interface. Basically what I want to do is a static preview of the location and display it as a picture (with a frame and rounded corners) When clicked then open maps and give all functionality. Is there a way to put a map fragment into a

Google Places API vs Google Maps results

匿名 (未验证) 提交于 2019-12-03 01:12:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I see some results on Google Maps but its not coming through Google Places API. https://maps.googleapis.com/maps/api/place/nearbysearch/json?key=my_api_key&sensor=false&radius=50000&location=40.338254%2C-74.585292&keyword=storybook+land whereas google maps shows Storybook Land, Black Horse Pike, Egg Harbor Township, NJ, United States Why this discrepancy? Is it not that Google Places API will show the exact results of Google Maps? I observed these kind of discrepancies in few other results also. Can somebody throw some light? 回答1: I think

Slippy maps for Java Swing GUIs: SwingX-WS

匿名 (未验证) 提交于 2019-12-03 01:12:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: This post's purpose is to gather in one place all useful info and material needed in order to implement slippy maps in a Swing application using the SwingX-WS library, now that the SwingLabs website is no more -- in spite of the fact that, however, SwingX development is still active. 回答1: So, first things first, the as-of-today up-to-date jars, built from the latest sources. SwingX-ws: swingx-ws rev. 317 binaries swingx-ws rev. 317 sources swingx-ws javadoc SwingX v. 1.6.5-1 (required runtime dependency, requires Java6 or newer): swingx

Capture Coordinates in Google Map on User Click

匿名 (未验证) 提交于 2019-12-03 01:10:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm using this code to capture the co-ordinates when user clicks on the map by using below event listener: google.maps.event.addListener(map, 'click', function(event) { placeMarker(event.latLng); }); However this function doesn't get called when user click on already marked location in Map. Meaning this function is not called for points where mouse pointer changes to hand icon on Google Map. Need help on capturing these kind of locations. 回答1: You should add the click listener on marker will give you the position of marker. //Add listener