maps

Snapshot from the map in android

巧了我就是萌 提交于 2019-12-10 00:16:44
问题 I want to make a snapshot of a particular location from the map by calling intent or from a mapview.Can anyone help me.I am not getting the snapshot. 回答1: Try this post, I believe this should help. It involves enabling the drawing cache and forcing it use that cache. Usually works on all views. Should work on MapView aswell Code from the link private Bitmap getMapImage() { /* Position map for output */ MapController mc = mapView.getController(); mc.setCenter(SOME_POINT); mc.setZoom(16); /*

How to display a custom map on Android [closed]

我们两清 提交于 2019-12-09 20:48:53
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . I'm trying to make an Android application that displays a map of a Park and when a user taps on a certain location on the map, the application goes to another screen. Problem is that currently my map of the park is in a .jpg format. Which mapping API is best for my application and how would I go about converting

Center maps in iOS Programming

浪子不回头ぞ 提交于 2019-12-09 17:23:16
问题 How do we follow the user in maps. I want to have the blue dot (user location) be in the center of the map, But I also what to allow the user to zoom in and zoom out and then after a couple seconds zoom in back in the user location. My Educated Guess for the Solution: We detect if the user is zooming in or out, after three seconds of no zooming in or out detection, we starting follow the user :). Your HELP would be awesome :) This code zoom in the user location but doesn't delay for zoom in

Google Maps remove marker route context menu

荒凉一梦 提交于 2019-12-09 17:10:02
问题 I started a new project with the Google Maps template of Android Studio and just added a marker to the map. LatLng location = new LatLng(lat, lng); Marker marker = mMap.addMarker(new MarkerOptions() .position(location) .icon(BitmapDescriptorFactory.fromResource(R.drawable.marker))); When I click the Marker there comes a little menu with a Google Maps icon on the bottom right corner: How can I get rid of this thing? I couldn't find anything I even don't know how to call it but I really need to

get coordinates by clicking on map (openstreetmaps)

孤街醉人 提交于 2019-12-09 17:04:54
问题 How can we get the coordinates of a point by clicking on it in open street maps? tried: public void onClick(View v) { Projection proj = mapView.getProjection(); IGeoPoint p = proj.fromPixels(v.getX(), v.getY()); System.out.println("x: "+ v.getX() + " y: "+ v.getY()); } cheers, Thanasio 回答1: Use dispatchTouchEvent() method. It works because the MapActivity inherits the dispatchTouch event, not the OnTouchEvent from Activity Class. @Override public boolean dispatchTouchEvent(MotionEvent ev) {

how to clear leaflet map of all markers and layers before adding new ones?

Deadly 提交于 2019-12-09 14:00:35
问题 i have the fallowing code: map: function (events) { var arrayOfLatLngs = []; var _this = this; // setup a marker group var markers = L.markerClusterGroup(); events.forEach(function (event) { // setup the bounds arrayOfLatLngs.push(event.location); // create the marker var marker = L.marker([event.location.lat, event.location.lng]); marker.bindPopup(View(event)); // add marker markers.addLayer(marker); }); // add the group to the map // for more see https://github.com/Leaflet/Leaflet

R - plotly - combine bubble and chorpleth map

梦想与她 提交于 2019-12-09 13:49:25
问题 I would like to combine two types of maps within one map in plotly, namely bubble and choropleth map. The objective is to show population size on a country level (choropleth) as well as on a city level (bubble) by hovering with the mouse over the map. The plotly example code for a choropleth map is as follows: library(plotly) df <- read.csv('https://raw.githubusercontent.com/plotly/datasets/master/2014_world_gdp_with_codes.csv') # light grey boundaries l <- list(color = toRGB("grey"), width =

Android Maps get Scroll Event

我与影子孤独终老i 提交于 2019-12-09 12:21:55
问题 i am currently developing an app with the Andoid Maps SDK. Now i would like to get a notice if the user scrolls the map to load additional markers from a server based on the new map center. I already searched for a function to register a listener but i didn´t find anything. Is there any way to get informed about map center changes? I don´t want to implement a polling mechanism for that... :( 回答1: I have done this in two ways: Touch listener. Set the on touch listener for the map view. Every

Android Map: How to animate polyline on Map?

房东的猫 提交于 2019-12-09 06:53:14
问题 When I plot my polyline on Map from point A -> B, I have a requirement to draw the polyline with animation. As if from A-> B the polyline keeps on drawing. I have used below link for reference: https://github.com/amalChandran/google-maps-route-animation Using the solution I am able to animate the polyline, but the polyline itself is not proper. It doesn't go through road. Original APK of the solution also has the same bug. Can someone pls help me with a suitable solution 回答1: You can try with

change content infowindow maps v3

社会主义新天地 提交于 2019-12-09 05:16:57
问题 I am trying to make it possible to change the content that shows up inside a DIV that is the content of an infowindow. I have been able to change the content from Hello to YO inside the infowindow. The problem is when I close the infowindow and reopen it the updated content reverts back to the original. Below is my code: google.maps.event.addListener(drawingManager, 'overlaycomplete', function(event) { if (event.type == google.maps.drawing.OverlayType.MARKER) { //event.overlay.setTitle("Hello