maps

In Google Maps getBoundingClientRect gives Unspecified Error in IE

匿名 (未验证) 提交于 2019-12-03 08:28:06
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: Relating to question in: Unspecified Error from Google Maps API on IE8 In function function Mp(a,b){ .. } the following line of code triggers an error var e=a.getBoundingClientRect(); To replicate this error Make a Google Map page (make sure it is tall enough that you've spare space to scroll the page, don't make the map full-screen) Place a Marker Open the app in IE ( I tested in 10) in debug mode When page loads, click on a marker such that it shows the info-window i.e. the pop-over Try scrolling the page You'll get the error.

Google maps API. Get continent where the country is located

跟風遠走 提交于 2019-12-03 08:26:18
There is a simple query to google API https://maps.googleapis.com/maps/api/geocode/json?address=&components=country:Russia&language=ru&key=MY_API_KEY Response contain the bounds, location and full address (for example - Russia) But i need to now that - Russia -> Europe, USA -> north America, Egypt -> Africa. How to do it?! Piotr Migdal Geocode with Google API. One of entries in "address_components" should look like that [ "country", "political" ] , e.g.: { "long_name" : "United States", "short_name" : "US", "types" : [ "country", "political" ] }, use its "short_name" value and convert it to

Geo chart for java

a 夏天 提交于 2019-12-03 08:13:14
Can anyone recommend a Java component that lets you create a pretty looking image of a world map, highlighting certain countries (based on some statistics). Something similar to this image: Something similar to Google Geo Charts (but for Java): https://developers.google.com/chart/interactive/docs/gallery/geochart but runs on the server side, without an internet connection. Ideally I'd like to attach weight to a few countries which would highlight them proportionally. Either open source or commercial (as long as it's not something ridiculously priced). I couldn't find a java library to do what

Getting map zoom level for given bounds on Android like on JS Google Maps API: map.getBoundsZoomLevel(bounds)

落花浮王杯 提交于 2019-12-03 08:12:11
I have a cluster marker that defines a bounding rectangle containing a group of markers. The cluster has a center (lat,lon), a marker count and a latitude and longitude span to calculate the bounds. The Google Maps API (JS) has a function called "getBoundsZoomLevel(bounds)" but I cannot find an equivalent method in the Google Maps SDK for Android. How can I estimate the zoom level for given bounds (especially on different devices with different resolutions/densitys)? I've planned that an user can touch a cluster marker and the map view will be centered to the center and the bounds of that

How Do I add Pins (Annotations) with Xcode 6 (Swift)

微笑、不失礼 提交于 2019-12-03 08:02:17
问题 This question was migrated from Ask Different because it can be answered on Stack Overflow. Migrated 4 years ago . I'm new to the swift language, and haven't done an application with mapkit yet. But I have the map and regions set, but I'm hung up on how to allow users to add pins. Let me clarify, I have no idea of even where to start, All I have at the moment (for the pins) is my variable, but I'm not even sure if that's correct. Any help would be much appreciated!! What I have... var MyPins:

Bing Maps V7 Context Menu

匿名 (未验证) 提交于 2019-12-03 07:50:05
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I use Bing Maps Ajax V7. I want on right click to get an infobox and show my links inside. function GetMap(){ // Initialize the map map = new Microsoft.Maps.Map(document.getElementById("mapDiv"),{credentials:""}); attachrightclick = Microsoft.Maps.Events.addHandler(map, 'rightclick',showPopupMenu); } function showPopupMenu(e){ var latlong = new Microsoft.Maps.Location(e.getY(),e.getX()); var defaultInfobox = new Microsoft.Maps.Infobox(latlong, {title: '<div>My Pushpin<div>', visible: true} ); map.entities.push(defaultInfobox); } Infobox

Animating markers on OpenStreet Maps using osmdroid

匿名 (未验证) 提交于 2019-12-03 07:50:05
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I'm using the google Maps marker animation logic given here . My marker gets animated,but after each marker.setPosition(newPosition); I need to call mapView.invalidate(); which refreshes the map resulting in very sluggish animation. Is there any workaround? 回答1: The next solution is working correctly for me: import org . osmdroid . api . IGeoPoint ; import org . osmdroid . api . IMapController ; import org . osmdroid . util . GeoPoint ; import org . osmdroid . views . MapView ; import org . osmdroid . views . Projection ; import

Allow user to place marker on a google map

匿名 (未验证) 提交于 2019-12-03 07:50:05
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I'm looking for a way to allow a user to place a marker on a Google map and then get the co-ordinates so I can email them to a user. Is it possible to allow users to do this on the fly? I've seen here and understand I can do this using longitude and Latitude. So using the above method can I get a Longitude and Latitude from a users click? 回答1: This older post is what you're looking for I think. Add in an ajax call with the lat/long and you should be good to go. 回答2: You can achieve this using the following code: google . maps .

Here maps is not working

匿名 (未验证) 提交于 2019-12-03 07:47:04
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I want to implement HERE Maps in my App. I just started to implement a sample app that just show HERE Maps . My code: // map embedded in the map fragment private Map map = null; // map fragment embedded in this activity private MapFragment mapFragment = null; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_here_maps); // Search for the map fragment to finish setup by calling init(). mapFragment = (MapFragment) getFragmentManager().findFragmentById( R.id

Length buffer around polyline

我的未来我决定 提交于 2019-12-03 07:43:55
问题 I'm not very good at mathematics, so I got a problem. I have a route from one, to another distination. Some time I was trying to apply a colored plot aroud the route in fixed length. But I cant get a nice rounded corners and my lack of math is making me a lot of truble. Now I got this And the code var r = []; var bla = result.routes[0].overview_path; for(i in result.routes[0].overview_path) { r.push(new google.maps.LatLng(bla[i].lat()+z, bla[i].lng()-z)); } bla.reverse(); for(x in bla) { r