marker

Xamarin Forms - Image To/From IRandomAccessStreamReference

断了今生、忘了曾经 提交于 2020-07-09 09:21:23
问题 For personal needs, for the Xamarin.Forms.Map control, I need to create a CustomPin extension. UWP part (PCL project) I create a MapIcon like it: nativeMap.MapElements.Add(new MapIcon() { Title = pin.Name, Image = RandomAccessStreamReference.CreateFromUri(new Uri("ms-appx:///Assets/Pin/customicon.png")), Location = new Geopoint(new BasicGeoposition() { Latitude = pin.Position.Latitude, Longitude = pin.Position.Longitude }), NormalizedAnchorPoint = new Windows.Foundation.Point(0.5, 1.0) });

Flutter Google Maps remove navigation button at bottomRight on marker tap

怎甘沉沦 提交于 2020-04-13 17:01:31
问题 Is it possible to remove the google maps navigation button at bottom right when we click on a marker? I tried this Marker( consumeTapEvents: true, onTap: () { print("marker clicked"); }, infoWindow: InfoWindow( title: "title", snippet: "snippet", onTap: () { markerTap(); }), ) It worked but I ran into a new issue that it doesn't open info window on marker on click. Any suggestion? 回答1: With google_maps_flutter version 0.5.20 they added support to enable/disable this. In your GoogleMap widget

Flutter Google Maps remove navigation button at bottomRight on marker tap

眉间皱痕 提交于 2020-04-13 17:00:19
问题 Is it possible to remove the google maps navigation button at bottom right when we click on a marker? I tried this Marker( consumeTapEvents: true, onTap: () { print("marker clicked"); }, infoWindow: InfoWindow( title: "title", snippet: "snippet", onTap: () { markerTap(); }), ) It worked but I ran into a new issue that it doesn't open info window on marker on click. Any suggestion? 回答1: With google_maps_flutter version 0.5.20 they added support to enable/disable this. In your GoogleMap widget

Leaflet: how can I display a marker or legend only on one layer?

一世执手 提交于 2020-03-23 08:05:54
问题 I made a leaflet map with different layers which look like this: L.easyButton('<span class ="buttons">Example </span>', function (btn, map) { if (map.hasLayer(example1)) { map.removeLayer(example1); }; if (map.hasLayer(example2)) { map.removeLayer(example2); }; if (map.hasLayer(example3)) { map.removeLayer(drittpa2017zweit); } map.addLayer(example4); }, 'FirstExample').addTo(map); and so on... I declared a legend, which I only want to use when one layer is on, right now it appears all the

Changing OSMDroid's MyLocationOverlay marker

纵然是瞬间 提交于 2020-02-25 08:47:06
问题 I want to change the marker in the MyLocationOverlay. What I've tried so far is subclassing OSMDroid's MyLocationOverlay and overriding the default marker, using code provided in this answer. However, it didn't work properly (I got the error: method drawMyLocation must override or implement a supertype method but commenting @Override solved it). However, the marker image stays the same (the question asked about Google Maps API, whereas I'm using OSMDroid) - how can I solve it? 回答1: You have a

Changing OSMDroid's MyLocationOverlay marker

≡放荡痞女 提交于 2020-02-25 08:47:06
问题 I want to change the marker in the MyLocationOverlay. What I've tried so far is subclassing OSMDroid's MyLocationOverlay and overriding the default marker, using code provided in this answer. However, it didn't work properly (I got the error: method drawMyLocation must override or implement a supertype method but commenting @Override solved it). However, the marker image stays the same (the question asked about Google Maps API, whereas I'm using OSMDroid) - how can I solve it? 回答1: You have a

Android Add Map Marker Error: java.lang.IllegalStateException: Not on the main thread

╄→尐↘猪︶ㄣ 提交于 2020-01-25 12:10:12
问题 I'm subscribing to a data stream that gets pushed coordinates, I want to place a marker on the map every time the listener gets a new point. What do I need to do to put the drawMarker code on the correct thread or in the correct scope? @Override public void onMapReady(GoogleMap googleMap) { mMap = googleMap; enableMyLocation(); subscribe(); } public void drawLatestPoint(LatLng p) { System.out.println(p); mMap.addMarker(new MarkerOptions().position(p).title("Marker in Sydney")); } private void

Android Add Map Marker Error: java.lang.IllegalStateException: Not on the main thread

Deadly 提交于 2020-01-25 12:10:10
问题 I'm subscribing to a data stream that gets pushed coordinates, I want to place a marker on the map every time the listener gets a new point. What do I need to do to put the drawMarker code on the correct thread or in the correct scope? @Override public void onMapReady(GoogleMap googleMap) { mMap = googleMap; enableMyLocation(); subscribe(); } public void drawLatestPoint(LatLng p) { System.out.println(p); mMap.addMarker(new MarkerOptions().position(p).title("Marker in Sydney")); } private void

Don´t preload images in XML (google maps API v3)

我的梦境 提交于 2020-01-24 23:43:27
问题 Hey i have a question that seems very tricky. I want to add images for every Infowindow in my map. But the clue is that the images shouldn't parse directly from the XML, because if there are 300 markers and for every marker an image, that would by a very big data which have to load on mapstart. Is it possible to load the image only if the marker has cliked ? Heres my code: <script type="text/javascript"> var side_bar_html = ""; var sidebarMarkers = []; var infoWindow = new google.maps

How to add text below a marker in leaflet?

泪湿孤枕 提交于 2020-01-23 17:31:29
问题 I created some markers on leaflet map but the only problem is that i dont know how to add a text below each marker and im not talking about popups. What I mean is that the text below the marker has to permanent. For e.g. a text below a marker on India that says "India". I have an example of what Im working on right now: var southWest = L.latLng(-89.98155760646617, -180), northEast = L.latLng(89.99346179538875, 180); var bounds = L.latLngBounds(southWest, northEast); var mymap = L.map('map', {