Hot answers tagged

2

This blog has an excellent example of how to make the window draggable and hide the arrow using dojo: https://gavinr.com/2015/04/13/arcgis-javascript-draggable-infowindow Here's the key javascript snippet: require([ 'esri/arcgis/utils', 'dojo/dnd/Moveable', 'dojo/query', 'dojo/on', 'dojo/dom-class' ], function ( arcgisUtils, ...


1

You need to close the polygon by adding the start point to the end of the list of points that you build the WKT with. So change it to: for (var z = 0; z < arreglo.length; z++) { arreglo2.push(arreglo[z][0]+" "+arreglo[z][1]); } arreglo2.push(arreglo[0][0]+" "+arreglo[0][1]); But I'm pretty sure you can use the OpenLayers WKT ...


1

Once you have your geojson back use the ol.format.GeoJSON() to parse the object and create the features. var format = new ol.format.GeoJSON(); var myGeoJsonObj = ....asign the geojson result here var myGeoJsonFeatures = format.readFeatures(myGeoJsonObj ) and then you may place your features in a vector layer using. ...


1

In the example you provided, you can see two events associated with the map object: click and pointermove. If I understood you well, you just have to switch the click event callback function with the pointermove event.



Only top voted, non community-wiki answers of a minimum length are eligible