marker

Along with title and snippet how to add extra data to marker?

微笑、不失礼 提交于 2019-12-06 22:32:19
问题 Problem : My remote server returns 10 multiple value for a request.i parsed my response and using for loop i added markers(here i added info to title and snippet) on a map.(here i want to add extra data to marker so that i can access it in on info window click event) in infoWindowClickListener i want to access that extra data. How to add extra data to marker/ how to access ph data for a particular marker click(other wise i will get last value of ph in all markers). i tried like this. private

google maps marker array?

随声附和 提交于 2019-12-06 22:05:30
Hi guys and girls if any :)) this piece of code creates a null pointer exception I would like to put a couple of markers in MO LAT = Double.parseDouble(PartA); LNG = Double.parseDouble(PartB); LatLng Standort = new LatLng(LAT, LNG); MO[y] = mMap.addMarker(new MarkerOptions() .position(Standort) .icon(BitmapDescriptorFactory.fromResource(R.drawable.kreis))); builder.include(MO[y].getPosition()); Array type expected - found com.google.android.gms.maps.model.maker Definition private static Marker MOrt = null; I don't know my answer help you out or not. First of all declare array , than add points

Putting an arrow (marker) at specific point on a path when using the d3 javascript library

丶灬走出姿态 提交于 2019-12-06 21:38:04
问题 I am working currently on a graph visualization and I use SVG and the D3 library. I was asked by our designer if I can put the arrowheads of the edges of the graph on a position corresponding to 80% of length of the lines. I was able to achieve the first part - getting the position - by using the getPointAtLength method. var svg = d3.select("body").append("svg") .attr("width", 960) .attr("height", 500) var path = svg.append("path") .attr("d", "M20,20C400,20,20,400,400,400") .attr("fill",

How to make markers in Leaflet blinking

淺唱寂寞╮ 提交于 2019-12-06 12:53:42
Is there a simple way to make a marker in Leaflet map blinking ? I mean animated blinking - something like a loop of transition from opacity 1.0 to opacity 0.5 in 1 second and then reverse, end of loop. When you add a Marker you are able to specify an Icon - the options for which include a className . You can use this className option to animate the marker's icon via CSS. var map = L.map('map').setView([51.505, -0.09], 13); L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { attribution: 'Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors', maxZoom: 18

Animate markers on Google MapView

放肆的年华 提交于 2019-12-06 10:51:20
I am working on an Android app that displays multiple markers on a Google MapView. Everything works perfectly but I would like the markers to have an animation when they appear on the map. Here's an example of something similar on iPhone. See 1'20". Here is how I add them to my MapView. for(int i=0; i<myMarkerList.length(); i++){ GeoPoint x = new GeoPoint( (int)(lat*1E6), (int)(lng*1E6)); oItem = new OverlayItem(x, title, String.valueOf(nb_marker)); pin.setAlpha(255); oItem.setMarker(pin); if (oItem != null) mapOverlay.addOverlay(oItem); // add the overlay item to the overlay } mapOverlays.add

Zoom and center marker on click in leaflet

痴心易碎 提交于 2019-12-06 03:32:31
问题 I have a problem with my leaflet map. I have some markers on my map and when clicking on one, the marker is centered. Now I want when clicking on one marker it is not only centered but I want to zoom in to the marker. When I add this map.setZoom((16), {animate: true}); to map.on('popupopen', function(centerMarker) { var cM = map.project(centerMarker.popup._latlng); cM.y -= centerMarker.popup._container.clientHeight/2 map.setZoom((16), {animate: true}); map.panTo(map.unproject(cM),{animate:

Use php to populate javascript array

醉酒当歌 提交于 2019-12-06 00:15:18
All, I have the following bit of code: function addPoints() { newpoints[0] = new Array(41.45998, 87.59643, icon0, 'Place', 'Content to open'); for(var i = 0; i < newpoints.length; i++) { var point = new GPoint(newpoints[i][1],newpoints[i][0]); var popuphtml = newpoints[i][4] ; var marker = createMarker(point,newpoints[i][2],popuphtml); map.addOverlay(marker); } } There is other code around this to display the marker on my map. However this value is hardcoded. I have a PHP/mySQL database that has lat/long coordinates along with some other values. Say I have like three entries that I want to

Exclude marker from clustering Google Maps Android API Utility Library on Android?

寵の児 提交于 2019-12-05 23:56:31
I am using Google Maps Android Utility Library adding objects/markers in ClusterManager , but I would like to exclude/add some markers that are not in Cluster. I was able to add markers on map using googleMap.addMarker() without clustering but the problem is that i have to handle OnInfoWindowClickListener wich is registered with ClusterManager so i can register the click on excluded Markers. Is there a posibility to combine ClusterManager from Utility Library with some markers that are not in cluster and register OnInfoWindowClickListener ? I haven't tried it myself, but this should work:

Custom marker with user image inside the pin

拟墨画扇 提交于 2019-12-05 21:00:00
问题 I am trying to display users on a map, I have already implemented the map in the app, but now I am trying to make custom markers that display a user's photo inside the pin something like this: Any idea how to do it ? 回答1: I have done this by taking reference from Telegram app Telegram App Add Marker in Google Map GoogleMap mMap; Marker marker; LatLng latLng = new LatLng(Double.parseDouble(lat), Double.parseDouble(long)); MarkerOptions options = new MarkerOptions().position(latLng); Bitmap

Android marker custom infowindow

你。 提交于 2019-12-05 18:49:03
I am using Google Map V2. I need to show the ListView (custom ListView with Image) in custom InfoWindow . I tried it and got success only in View , the problem is I can't get the listItemClick event. googleMap.setInfoWindowAdapter(new InfoWindowAdapter() { @Override public View getInfoWindow(Marker arg0) { // TODO Auto-generated method stub return null; } @Override public View getInfoContents(Marker arg0) { View v = getLayoutInflater().inflate(R.layout.infowindow, null); try{ String[] names = {"The Mayfair (D22) Condominium, For Rent","The Mayfair (D22) Condominium, For Rent","The Mayfair (D22