Plot markers For QuantilePlot

I want to change the plot markers of the data points in QuantilePlot. This seems pretty straightforward:

QuantilePlot[                 RandomVariate[NormalDistribution[0, 1], 32], NormalDistribution[mu, sigma],                 ReferenceLineStyle -> Directive[Red, Dashing[{Large}]], PlotMarkers -> {"\[EmptyCircle]"}             ]  

However we can see that we get a "Null" plot marker at either end of the reference line: enter image description here

Is there a specific command required in QuantilePlot to customise the plot markers for the data points?

Google Map with several markers are not displayed

Hello,
In laravel 5.8 app I add Google Map with several markers and I have empty block and no errors in console
and no map acttually is visible
In function with code:

frontendTimeline.prototype.initEventsListingMap = function () {      console.log("this_mapEvents::")     console.log( this_mapEvents )      $  ("#div_map_wrapper").css("display","block")      var map = new google.maps.Map(document.getElementById('div_map'), {         zoom: 12,         mapTypeControlOptions: {...
Code (JavaScript):

Google Map with several markers are not displayed

Custom plot markers in DistributionChart

I would like to use the ChartElementFunction option of DistributionChart to plot data with a custom style that includes custom plot markers, such as open circles. I am struggling with the scaling of the markers, though.

If I use Points as plot markers, everything is fine:

data = Table[RandomReal[i + {1, 3}, 10], {i, 5}];  cef1[{{xmin_, xmax_}, {ymin_,ymax_}}, data_, metadata_]:=     {Black, PointSize[Large], Point[{RandomReal[{xmin, xmax}], #}]& /@ data};  DistributionChart[data, ChartElementFunction -> cef1] 

enter image description here

If I use Circles, they are affected by the aspect ratio of the plot and shown as ellipses:

cef2[{{xmin_, xmax_}, {ymin_, ymax_}}, data_, metadata_] :=      {Black, Circle[{RandomReal[{xmin, xmax}], #}, 0.05] /@ data};  DistributionChart[data, ChartElementFunction -> cef2] 

enter image description here

Is there a way to get the scaling right, for example make the markers behave like PlotMarkers in ListPlot?

Fixing identical Latitude/Longitude data for markers on maps (bug)

I have a Drupal 7 project that I want to add location information (latitudinal/longitudinal) to most of my content types. Currently I have noticed that if there are multiple nodes that are shown on a map and if any of those nodes have identical latitudinal/longitudinal data, then the map markers are overlaid on top of one another and only the top map marker is visible. The markers under the top most marker can’t be accessed (clicked to show data).

enter image description here

This essentially hides content, which is a type of bug, and if the content is hidden, most times you won’t realize it is a problem.

This becomes a serious problem when you are generating map data from address locations. The user can be very vague with their address, and simply put their country ie: “Mexico”. If other nodes are created with such vague data then the overlap problem occurs.

One was around this is to use the module “Google Map Field”, which allows the user to use a map with a map marker when creating or editing content to specify where the node is referring to. The lat/long data is generated behind the scenes. It is very hard to get duplicated lat/long data when selecting the location on a map with a map marker. One problem with this is that the “Google Map Field” also allows them to enter their location by address, (ie:Eugene, Oregon, USA), if they don’t want to do it with the map/marker. An admin can put a nice label on the field saying to only use the map/marker, and not put it in by address, but people often ignore instructions on labels.

We also need to have location (lat/long) data for Users “Profile2” profile. One problem with this is the “Google Map Field” does not work with Profile2, and gives a recursion error. The only way around this is to make the user put their lat/long data in by hand (not going to happen), or do it like we are currently doing it, where the user puts in their address and the lat/long data is calculated from that address. Again the problem where users can put in vague address location information and cause duplicate lat/long data that cause map marker obfuscation.

I have not seen any good solutions for this. I have thought of some custom solutions (some I don’t know are possible, and currently purely hypothetical)

1)For “Google Map Field” somehow disallow the inputting of the location information through the address textbox, thereby forcing them to enter their address information from the Map/Marker. I am not sure what best ways of doing this are…Change the available fields for the module manually? Find a different contributed module that allows you to deny certain fields for nodes being created or edited? (does such a module even exists?)

2) A possible solution would be to create a module that goes through the Drupal database and finds tables that have latitudinal/longitudinal coordinates that are attached to content types. The module would check for identical latitudinal/longitudinal coordinates that were identical and change their coordinates ever so slightly (like adding a one-one-hundredth of a degree to one of the identical coordinates, there by making them non identical. Experimenting with this manually, I was able to change one-one-thousandth of a degree to one lat/long row for identical location coordinates and this corresponded to about a 1 block change in location (thereby making the 2 markers have different locations on the map). If you set this module up to perform this calculation and data alteration every time cron is run then you would then solve your identical lat/long data problem.

One potential problem I have thought of is that we would like, in the end to have our profile2 profile data synchronize with our Salesforce data, and if that was the case, then if the Salesforce data was altered, it would synchronize with our Drupal data, and then the lat/long data could potentially overwrite our changes our custom module made, thereby adding identical lat/long data (sort of un-fixing our fix). If we did have our Profile2 data synchronizing with Salesforce (which would sync every cron run), I had considered finding a way to make sure our custom module was run AFTER the Drupal/Salesforce sync module ran.

I’m posting these hypothetical solutions to you, the Drupal community because it is possible that one of you have already solved this problem, and have just not posted anything about it, or you might have a strong opinion about one of these solutions, one way or another. It might be possible that you have encountered this problem, but had no solution, even hypothetical in mind, and this posting to this forum helps you in some way.

Please, I would love to hear alternative solutions, opinions about my hypothetical solutions, or thoughts in general about this identical location map marker overlay problem.

Sincerely,

David Pugh

Repor markers da google

Olá

Eu tou a criar um script para remover os markers e colocar so os markers especificos, mas so está a funcionar uma vez se eu depois tentar selecionar outro filtro os markers aparecem todos de volta e nao apagam e colocam os markers especificos, alguem me pode ajudar com o script?

Ao entrar na pagina:

inserir a descrição da imagem aqui

Com o filtro Masc selecionado: (so aparece o marker no porto)

inserir a descrição da imagem aqui

Com o filtro Fem selecionado: (a marker do porto devia desaparecer)

inserir a descrição da imagem aqui

O marker do Fem como ta selecionado o marker do porto devia selecionar, basicamente o que devia fazer era apagar os markers antigos novos e marcar os markers que o select indica… alguem sabe como fazer isso?

Codigo:

function LoadJsonData() {    var jsondata;    $  .ajax({        url: './json/dados.json',        dataType: 'json',        async: false,       success: function(json){            jsondata = json;       }    });    return jsondata; }  var map; var markers = [];       function initMap() {      var jsondata = LoadJsonData();           map = new google.maps.Map(document.getElementById('map'),         {             center: { lat: 38.736946, lng: -9.142685 },             zoom: 7,             });                          for (var i = 0; i < jsondata.length; i++) {             var iconBase = './imagens/iconmapa2.png';             var obj = jsondata[i];                  var marker = new google.maps.Marker({                 position: new google.maps.LatLng(obj.latitude, obj.longitude),                 map: map,                 title: obj.title,                 id: obj.id,                 visible: true,                 icon: iconBase             });              markers.push(marker);         }     }   function setMapOnAll(map) {     var iconBase = './imagens/iconmapa2.png';     for (var i = 0; i < markers.length; i++) {         if(markers[i].visible == true)         {             var marker = new google.maps.Marker({                 position: markers[i].position,                 map: map,                 title: markers[i].title,                 id: markers[i].id,                 visible: true,                 icon: iconBase             });         }         else         {             markers[i].setMap(null);         }     }   }  $  (document).on("click", "#btnBuscar", function () {     var filtroFaixaEtaria = $  ("#FaixaEtaria option:selected").text();     var filtroSexo = $  ("#Sexo option:selected").text();     var filtroRecursoArma = $  ("#RecursoArma option:selected").text();     var filtroDistrito = $  ("#Distrito option:selected").text();      var arrayResultados = jsondata.filter(function (item) {         var criteria = true;          if (filtroFaixaEtaria != null && filtroFaixaEtaria != "")             criteria = criteria && item["Faixa Etaria"] == filtroFaixaEtaria;         if (filtroSexo != null && filtroSexo != "")             criteria = criteria && item["Sexo"] == filtroSexo;         if (filtroRecursoArma != null && filtroRecursoArma != "")             criteria = criteria && item["RecursoArma"] == filtroRecursoArma;         if (filtroDistrito != null && filtroDistrito != "")             criteria = criteria && item["Distrito"] == filtroDistrito;          return criteria;      });      for (var i = 0; i < markers.length; i++) {                 markers[i].setMap(null);     }          var iconBase = './imagens/iconmapa2.png';       for (var i = 0; i < arrayResultados.length; i++) {       var marker = new google.maps.Marker({         position: markers[arrayResultados[i].id-1].position,         map: map,         title: markers[arrayResultados[i].id-1].title,         id: markers[arrayResultados[i].id-1].id,         visible: true,         icon: iconBase     });      } 
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <div id="escolha">           <form id="selectsfiltro">             <h6>Faixa Etaria:</h6>             <select id="FaixaEtaria" class="custom-select">               <option></option>               <option value="1">0-17</option>               <option value="2">18-25</option>               <option value="3">26-35</option>               <option value="4">36 ou mais</option>             </select>              <br />             <br />             <h6>Sexo:</h6>             <select id="Sexo" class="custom-select">               <option></option>               <option value="5">Masc</option>               <option value="6">Fem</option>             </select>              <br />             <br />             <h6>Recurso a arma:</h6>             <select id="RecursoArma" class="custom-select">               <option></option>               <option value="7">Sim</option>               <option value="8">Não</option>             </select>               <br />             <br />             <h6>Localidade:</h6>             <select id="Distrito" class="custom-select">               <option></option>               <option value="9">Viana do Castelo</option>               <option value="10">Vila Real</option>               <option value="11">Bragança</option>               <option value="12">Braga</option>               <option value="13">Porto</option>               <option value="14">Aveiro</option>               <option value="15">Viseu</option>               <option value="16">Guarda</option>               <option value="17">Coimbra</option>               <option value="18">Castelo Branco</option>               <option value="19">Leiria</option>               <option value="20">Lisboa</option>               <option value="21">Santarém</option>               <option value="22">Portalegre</option>               <option value="23">Évora</option>               <option value="24">Setúbal</option>               <option value="25">Beja</option>               <option value="26">Faro</option>               <option value="27">Açores</option>               <option value="28">Madeira</option>             </select>           </form>            <br>            <div class="botesdefiltrar">             <button id="btnBuscar" class="btn btn-outline-warning">Filtrar</button>           </div>         </div>                  <div id="map" class="googlemap"></div>

Creating multiple Leaflet maps with multiple markers (per map) with labels

I’m writing a long article with multiple maps (for illustration purposes). The article is written in paragraphs (the module), and I’d like to contain the maps in paragraph types as well if possible.

  • Each map needs multiple markers
  • each marker needs its own popup (or hover) label.
  • each label needs two text entries, ‘title’ and ‘text’

I think it would be possible using views, but don’t have enough experience working with those. If the solution requires the use of views, I would need it to be reusable for future articles without having to create new custom views every time.

  • Ideally, in the ‘create content’ interface I would just like to associate a text field with a geofield. When working with a single marker per map, this is easy: I created a paragraph type for displaying maps with a two text fields and a geofield. This outputs a map with a single marker, and the text as I wanted it. But now I need multiple markers per map.
  • So I allowed for unlimited entries in the geofield and text fields, which produces the desired markers… But of course, all the text fields are thrown together in every label as there’s no way to associate a specific text field with a specific geofield. See images:

A marker with an overpopulated label A second marker with the same overpopulated label

Current behaviour: All labels display Italie, Duitsland, En nog een land <br> tekst1, tekst2, tekst3

Desired behaviour: for the first marker to display Italie <br> tekst1, the second label Duitsland <br> tekst2 and a third marker En nog een land <br> tekst3

Platform: drupal 8, modules used: paragraphs, leaflet, geofield, geophp.

Background information: the article is about arms manufacturers, and I need one map per weapons system (for example, a fighter plane contains components made by many different manufacturers, all of whom need to be on a single map. Each marker then needs a popup saying which company this is, and which airplane part they contribute).

Why should a language prefer indentation over explicit markers for blocks?

I am learning Haskell, and I was looking for an auto indentation tool. I didn’t look much, and learned that in Haskell (as in Python), indentation signifies a block. As a result, I’m guessing that it’s impossible to create an auto formatting tool, as strong as in other languages in the C family, that use explicit markers, such as { } (curly braces) or begin end keywords.

I do not mind a language enforcing indentation for readability, but I cannot understand the benefits over both enforcing indentation and having some explicit marker, so that automated tools, can understand what belongs in which block.

If the preference of indentation marking a block, is so that code looks better, then I still don’t understand the advantage. Given that tabs and spaces are represented differently in different editors and different fonts (mono-space fonts for example look tidier), it’s infeasible to expect the programmer to present the code decently. A tool that can take into account the current text editor, would be much more appropriate to format the code correctly.

Why would a language designer choose indentation over explicit block markers?

Google maps v3, javascript, como continuar a mover vários markers em simultâneo

Boa tarde, tenho um site em phpvms com um mapa google maps v3. O mapa funciona bem e os markers também, mas os markers não se movem continuamente, ao atualizar os markers eles desaparecem e aparecem na nova coordenada.
O que pretendia era mover os markers continuamente (tipo flightradar24), de preferência consoante a velocidade. Exemplo: http://jsfiddle.net/HYuRR/2/
Baseado nesta resposta https://stackoverflow.com/a/10906464/4730440
Tenho tentado adaptar o código acima mas sem sucesso, sou novato em programação.

Em baixo está o meu mapa original, acarsmap.js. Os markers a mover são flightMarkers.
A variável data contém toda a informação da base de dados.
lat contém latitude
lng contém longitude
gs irá conter a velocidade em knots

var flightMarkers = []; var routeMarkers = []; var flightPath = null; var depMarker = null, arrMarker = null; var info_window= null; var run_once = false;  var defaultOptions = {     autozoom: true,     zoom: 4,     center: new google.maps.LatLng(-25.363882,131.044922),     mapTypeId: google.maps.MapTypeId.TERRAIN,     refreshTime: 12000,     autorefresh: true };  var options = $  .extend({}, defaultOptions, acars_map_defaults); var map = new google.maps.Map(document.getElementById("acarsmap"), options);  // They clicked the map google.maps.event.addListener(map, 'click', function() {     //clearPreviousMarkers(); });  liveRefresh(); if(options.autorefresh == true) {     setInterval(function () { liveRefresh(); }, options.refreshTime); }  function liveRefresh() {     $  .ajax({         type: "GET",         url: url + "/action.php/acars/data",         dataType: "json",         cache: false,         success: function(data)          {             populateMap(data);         }     }); };  function populateMap(data) {     clearMap();     $  ("#pilotlist").html("");      if (data.length == 0) {         return false;     }      var lat, lng;     var details, row, pilotlink;     var bounds = new google.maps.LatLngBounds();      for (var i = 0; i < data.length; i++)      {         if(data[i] == null || data[i].lat == null || data[i].lng == null             || data[i].lat == "" || data[i].lng == "")         {             continue;         }          lat = data[i].lat;         lng = data[i].lng;          if(i%2 == 0)             data[i].trclass = "even";         else             data[i].trclass = "odd";          // Pull ze templates!         var map_row = tmpl("acars_map_row", {flight: data[i]});         var detailed_bubble = tmpl("acars_map_bubble", {flight: data[i]});          $  ('#pilotlist').append(map_row);          var pos = new google.maps.LatLng(lat, lng);         flightMarkers[flightMarkers.length] = new google.maps.Marker({             position: pos,             map: map,             icon: url+"/lib/images/inair/"+data[i].heading+".png",             flightdetails: data[i],             infowindow_content: detailed_bubble         });          bounds.extend(pos);          google.maps.event.addListener(flightMarkers[flightMarkers.length - 1], 'click', function()          {             clearPreviousMarkers();              var focus_bounds = new google.maps.LatLngBounds();             // Flight details info window             info_window = new google.maps.InfoWindow({                  content: this.infowindow_content,                 position: this.position             });              info_window.open(map, this);              // Add polyline, and start/end points             var dep_location = new google.maps.LatLng(this.flightdetails.deplat, this.flightdetails.deplng);             var arr_location = new google.maps.LatLng(this.flightdetails.arrlat, this.flightdetails.arrlng);              depMarker = new google.maps.Marker({                 position: dep_location,                 map: map,                 icon: depicon,                 title: this.flightdetails.depname,                 zIndex: 100             });              arrMarker = new google.maps.Marker({                 position: arr_location,                 map: map,                 icon: arricon,                 title: this.flightdetails.arrname,                 zIndex: 100             });              // Now the flight path, if it exists             var path = new Array();             path[path.length] = dep_location;             focus_bounds.extend(dep_location);             if(this.flightdetails.route_details.length > 0)             {                 $  .each(this.flightdetails.route_details, function(i, nav)                 {                     var loc = new google.maps.LatLng(nav.lat, nav.lng);                      if(nav.type == 3)                         icon = "icon_vor.png";                     else                         icon = "icon_fix.png";                      var navpoint_info = tmpl("navpoint_bubble", {nav: nav});                     routeMarkers[routeMarkers.length] = new google.maps.Marker({                         position: loc,                         map: map,                         icon: url + "/lib/images/"+icon,                         title: nav.title,                         zIndex: 100,                         infowindow_content: navpoint_info                     });                      google.maps.event.addListener(routeMarkers[routeMarkers.length - 1], 'click', function()                      {                         info_window = new google.maps.InfoWindow({                              content: this.infowindow_content,                             position: this.position                         });                          info_window.open(map, this);                     });                      path[path.length] = loc;                     focus_bounds.extend(loc);                 });             }              path[path.length] = arr_location;             focus_bounds.extend(this.position);             focus_bounds.extend(arr_location);              flightPath = new google.maps.Polyline({                 path: path,                 strokeColor: "#FF0000", strokeOpacity: 1.0, strokeWeight: 2             });              map.fitBounds(focus_bounds);              flightPath.setMap(map);         });     }      // If they selected autozoom, only do the zoom first time     if(options.autozoom == true && run_once == false)     {         map.fitBounds(bounds);          run_once = true;     } }  function clearPreviousMarkers() {     if(info_window)     {         info_window.close();         info_window = null;     }      if(depMarker != null)     {         depMarker.setMap(null);         depMarker = null;     }      if(arrMarker != null)     {         arrMarker.setMap(null);         arrMarker = null;     }      if(routeMarkers.length > 0)     {         for(var i = 0; i < routeMarkers.length; i++) {             routeMarkers[i].setMap(null);         }     }      routeMarkers.length = 0;      if(flightPath != null)     {         flightPath.setMap(null);         flightPath = null;     } }  function clearMap() {     if(flightMarkers.length > 0)     {         for(var i = 0; i < flightMarkers.length; i++) {             flightMarkers[i].setMap(null);         }     }      flightMarkers.length = 0;      if(routeMarkers.length > 0)     {         for(var i = 0; i < routeMarkers.length; i++) {             routeMarkers[i].setMap(null);         }     }      routeMarkers.length = 0; }   

Agradecia uma ajuda a adaptar o código, muito obrigado.
Helder Duarte

How markers move without refreshing the application, using the GPS of android

I currently on module of tracking the users using the geolocation of google map. I started coding this since 3 days ago, I use the react-native-maps for the mapview, since I already plot all the codes displaying my current location and watching my position where I am now. I found out when I walk outside my marker is not moving, and I try to debug the state of my lat and long, the watching function is not working well.

Question: How to make a real time moving marker without refreshing the application using the GPS of android.

Since I already done creating the function, I will show you guys my codes, so the other having same issue will solved there problem also,

This is my current location on my mobile phone,

My current location

As you can see on the top of my google map, is my current location or the lat and long of my location.

14.6211748 , 121.0138529

Now since I already get my lat and long, Using the watch position the GPS automatically detect my lat and long every time move right? The problem here why my lat and long is not changing in real time?

Is there other function for the real time update of lat long?

Now guys, This is my code for that,

My State:

this.state = {    currentLocation: {     latitude:0,     longitude:0,     latitudeDelta:0,     longitudeDelta:0   },    updatedLocation: {     latitude:0,     longitude:0,     latitudeDelta:0,     longitudeDelta:0   },    markerPosition: {     latitude:0,     longitude:0,     latitudeDelta:0,     longitudeDelta:0   }   } 

My async Current Location

 watchID: ?number = null;   async _currentPosition() {     navigator.geolocation.getCurrentPosition((position) => {        //lat and long current       var lat = parseFloat(position.coords.latitude)       var long = parseFloat(position.coords.longitude)        var currentLocationValue = {         latitude:lat,         longitude:long,         latitudeDelta:LATTITUDE_DELTA,         longitudeDelta:LONGTITUDE_DELTA       }        this.setState({currentLocation:currentLocationValue})       this.setState({markerPosition:currentLocationValue})        console.log(currentLocationValue);      },(error) => alert(JSON.stringify(error)),    {enableHighAccuracy: true, distanceFilter: 1, timeout: 1000})   } 

For watching position function:

    async _updatedPosition() {     this.watchID = navigator.geolocation.watchPosition((position) => {          //lat and long current         var lat = parseFloat(position.coords.latitude)         var long = parseFloat(position.coords.longitude)          var updateLocationValue = {           latitude:lat,           longitude:long,           latitudeDelta:LATTITUDE_DELTA,           longitudeDelta:LONGTITUDE_DELTA         }          this.setState({updatedLocation:updateLocationValue})         this.setState({markerPosition:updateLocationValue})          console.log(updateLocationValue);       },(error) => alert(JSON.stringify(error)),     {enableHighAccuracy: true, distanceFilter: 1, timeout: 1000})   } 

My Component Mounts:

     componentDidMount() {     this._currentPosition();     this._updatedPosition();    }    componentWillUnmount() {     navigator.geolocation.clearWatch(this.watchID)   } 

My Render function:

  render() {     return (         <View style={styles.container}>            <MapView                style = {styles.mapcontainer}               region = {this.state.currentLocation}               onRegionChange={this.onRegionChange}                >                <MapView.Marker                    coordinate={this.state.markerPosition}>                   <View style={styles.radius}>                       <View style={styles.marker}/>                   </View>               </MapView.Marker>            </MapView>           <Text>             {this.state.updatedLocation.latitude},{this.state.updatedLocation.longitude}           </Text>         </View>       )   } 

Custom markers with different shapes and colors in leaflet R

There are some examples to create custom markers in leaflet, but most of them are only for one variable. However, there are lots of data with several factors, which is better to visualize with different shapes and colors.

Here is the dummy data, how to polt markers with different shapes and colors?

lat1= 36+runif(n=5,min=-1,max=1) lon1 =-115+runif(n=5,min=-1,max=1)  lat2= 35+runif(n=5,min=-0.5,max=0.5) lon2 =-110+runif(n=5,min=-0.5,max=0.5)  lat3= 34+runif(n=5,min=-0.5,max=0.5) lon3 =-112+runif(n=5,min=-0.5,max=0.5)  data_all=rbind(data.frame(Longitude=lon1,Latitude=lat1,Group=1),            data.frame(Longitude=lon2,Latitude=lat2,Group=2),            data.frame(Longitude=lon3,Latitude=lat3,Group=3)) data_all$  color <- rep(c("red", "green", "grey"), 5)