New answers tagged

0

Your map object should contain MapTypeControlOptions and MapTypeIds, for example: function initMap() { var map = new google.maps.Map(document.getElementById('map'), { zoom: 5, center: {lat: 40, lng: 30}, mapTypeControl: true, mapTypeControlOptions: { mapTypeIds: [ google.maps.MapTypeId.ROADMAP, ...


1

Based on this thread it appears that this is a limitation of the print task API. The ESRI staff member there stated: Unfortunately, i don't know how of a good way to work around this problem (other than ensuring that you have fields present in the data for values you need to render by.)


2

Adding the first coordinate of first polygon to the last polygon and then force this to be polygon will result to an invalid geometry (like the one in your image) Instead of messing with the coordinates use the ol.format.wkt to get the geometry as WKT and then pass this to your java class. e.g var ol3Geom = vectorSeleccion[x].getGeometry(); var format = ...


1

This is perfectly explained in the Leaflet API reference for map options.


0

Your code contains: &CQL_FILTER=user_id=1 And I will guess that the two =s are messing up the URL. In Leaflet WMS tilelayers, any extra options which are not defined will be passed to the WMS server as parameters in each request URL, so: var layer = L.tileLayer.wms( 'http://my_wms_adress:8080/geoserver/my_location/wms', { ...


1

The Leaflet way: L.map('map', {attributionControl: false, etc...}) A simple $('.leaflet-control-attribution').hide() or non jQuery document.getElementsByClassName( 'leaflet-control-attribution' )[0].style.display = 'none';. Vladimir himself says it's OK to remove it: https://groups.google.com/d/msg/leaflet-js/fA6M7fbchOs/JTNVhqdc7JcJ, but it seems like ...


3

You can initialize your Borne geoJson layer without any data but with a styling function specified in the options: var Borne = new L.GeoJSON(false, { style: function (feature) { return {color: feature.properties.color}; } }); This style will be applied to any data you add later with addData.


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, ...


2

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.


0

You can access Leaflet's internal layer id using L.stamp and set the color of the polyline by changing its .options.color property. To log the properties to the console each time the layer is edited, you will want to listen for the edit event: map.on('draw:created', function(e) { console.log('Layer created: ' + L.stamp(e.layer)); ...


0

I just found your answer. While your solution was that Measure doesn't use the Snapping Control, it seems to me, that in my application this is not true. When I disable the OpenLayers.Control.Snapping, then no snapping occurs. So it is used. The only difference to your application is, that I use the DynamicMeasure.js lib which extends the Measure.js from ...


0

Here is the updated section of your fiddle. Remove the zoomToFeature function and replace with stateLink. If you have the urls stored with the data, you wouldn't need to do this. Would just assign urlLink to e.target.feature.properties.whateverfieldholdstheURL function stateLink(e) { // console.log(e.target.feature.properties.name); var urlLink; ...


2

The geometry column of a ShapeFile must be called "the_geom", your's is called "location" so the ShapefileWriter ignores it. change SimpleFeatureType featureType = DataUtilities.createType( tipoShape, "location:" + tipoShape + ":srid=4326," + "number:Integer"); to SimpleFeatureType featureType = DataUtilities.createType( tipoShape, "the_geom:" + ...


0

The points appear as billboards by default. You can change them to points with the following code: var entities = dataSource.entities.values; for (var i = 0; i < entities.length; i++) { var entity = entities[i]; entity.billboard = undefined; entity.point = new Cesium.PointGraphics({ color: Cesium.Color.fromRandom(), ...


1

If you are using Openlayers see here. If you are using leaflet see here. For pure javascript see here or for NPM resources here or here There are other solutions beyond these but this should be enough to be getting on with.


3

I can confirm that, as you've reported, this appears to be a real bug in both 0.7x and 1.0x (on Chrome, at least; I haven't tested it elsewhere). However, there is a workaround that seems to prevent it. If you name your click event listener function, you can turn it off on dragstart, then use setTimeout to turn it back on a short time after dragend: ...


0

The Array.prototype.filter method is really slow. In cases where you can rely on an array being predictably formatted (as is presumably the case with CSV data returned from Papa), you are better off just using a for loop to iterate over it yourself. Here is a function that takes the GeoJSON feature properties, Papa Parse data, and a join field name as ...


4

No, this isn't possible. For one, if you were to load both API's, you would end up with a namespace collision with Dojo's Define and Require. For two, the API is obfuscated (not human readable) making it difficult to extract just the parts you need. Even if you could, there may be dependencies in that module preventing you from using it with an older API.


0

Polygons don't automatically pick up terrain height values when you enable Cesium terrain. You need to set entity.polygon.height for each polygon, and also add that same height to your existing entity.polygon.extrudedHeight. In other words, extrudedHeight is the absolute height (above WGS84) of the top of the extrusion, so if you have a building of fixed ...


0

I found the issue , Esri will not support GIF image when exporting map.When I debug , the layer details was sending with a url of image(gif), and issue solved when I replaced the gif with a png.. { "id": "userLocation", "opacity": 1, "minScale": 0, "maxScale": 0, "featureCollection": { "layers": [{ ...


1

GraphHopper is able to run offline in the Browser with the help of TeaVM See here for the examples. See here the blog post about it See here is the source repository Note: I'm the author of GraphHopper ...


3

You need to extrude polygons: entity.polygon.extrudedHeight = entity.properties.your_height_field You may need to loop over records, for example: var p = dataSource.entities.values; for (var i = 0; i < p.length; i++) { p.polygon.extrudedHeight = entity.properties.your_height_field


1

There are a couple of things wrong in your code. First of all, you should use createVis instead of createLayer in order to set map options. Then, you have to use as function arguments vis and layer/s if you want to set interactions. Here I have built a working example using createVis with map options like the ones in your params object. :-)


0

You must declare this : element: popup[0]


0

There are many ways to achieve what you want. For example, you can replace the following part: var div = $('<div style="width: 200px; height: 200px;"></div>')[0]; m.bindPopup(div); m.openPopup(); var chart = new Charts.CircleProgress(div, "", 50, { font_color: "#fff", fill_color: "#222", stroke_color: "#4591C9" }); with: var ...


0

I am not an expert or anything, but I see that when you uncheck you completely remove the layer, and never add it back into the map. maybe it can be as simple as adding map.addLayer(popDensity);in your overlayadd function before using bringToFront(). Hope that helps, and if not I hope you get an answer that helps soon!


0

You could look at map panes in leaflet beta or use .bringToFront() on every overlayadd event at least as far as keeping the popDensity layer on top.



Top 50 recent answers are included