Tag Info

New answers tagged

0

May be you can also consider Heron . It is built on Ext and open layers together they have many templates that you can customize .


-1

circle1 with r=107.5 naut.mile and circle2 with r=145 naut.mile intersect at points as shown in the image:


1

I would recommend looking into Cesium: http://cesiumjs.org/ I have been using it for quite a while and found it to be a great 3D solution. It is open source and provides for additional things like 3D terrain, vector graphics, billboards and 3D models.


0

You're running into the same origin policy (https://en.wikipedia.org/wiki/Same-origin_policy)


0

You need to define the affine transformation for transforming the map with the layer's tile origin (upper left corner) coordinates. context.EPSG27700 = new L.Proj.CRS( 'EPSG:27700', '+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000' + '+ellps=airy +datum=OSGB36 +units=m +no_defs', { transformation: new ...


0

You have updated params before you'd defined the SLD variable. wms_p_popf.updateParams({STYLES: undefined, SLD_BODY: SLD}); var SLD = ...


0

For a remote SLD to be applied to a Layer you must make sure that the <Name> in the <NamedLayer> is the same as the name of the layer you are styling. So in your case pack_geomarketing_iris13_region doesn't match DatashinePBS:PopF so nothing is drawn. You might also want to check in GeoServer that the SLD is in fact valid (as GeoServer doesn't ...


1

According to the Leaflet documentation, the layer config is an object literal with layer names as keys and layer objects as values. That means you can use [] to set the object key, here is the modified codes: var layerName = feature.properties.condition[0]; //layer control var baseMaps = { "OpenStreetMap": OSM, "Aerial Imagery": ...


0

What you are looking to do is draw a polygon onto the map using a series of coordinates for the inside and outside bounds. If you want a solid filled polygon, do not include the points for the inner shape. The following code would produce a polygon with a missing center. There are comments within to the code to help guide you as well. I hope this is what ...


1

If you do (or want to) use the Leaflet 1.0 Beta version, Marker and Path have an interactive option. If false, the marker will not emit mouse events and will act as a part of the underlying map. (from leaflet beta API)


1

If you use the default ol map, your map use probably the EPSG:3857 but your wms doesn't allow this CRS (see <CRS>tags in your GetCapabiltities). Allow this projection in the layer's definition of your WMS server config and it will work.


2

They are not bad coordinates. They are in Web Mercator (EPSG: 3857 aka 900913 - units meters). This is the default projection for Openlayers. These coordinates are perfectly normal but what you mean is "how can I get coordinates in decimal degrees projected to EPSG: 4326" (which is what you were expecting). To do that, see this example where you can see ...


1

This is because losing focus on the map inside winform. You can use yourBrowserControl.Document.Focus() to re-focus on the map after any of your c# actions and you will get your mouse wheel control back. In my case, I used splitContainer to split the screen and I used the following code which works out great. Every time when I click on the map, it will ...


0

After doing some more searching, it looks like there could be an issue with how Firefox is trying to read your scripts. In the HTML header be sure to include: <!DOCTYPE html> <meta charset="utf-8"> I know that denoting HTML5 and utf-8 is a little bit of overkill but my only guess is that there may be some form of characters that could be ...


0

queryTask.execute(query, function (results) { var selectionSymbol = new PictureMarkerSymbol('http://www.clipartandgraphics.com/images/borders/coloroval.gif', 50, 50); var graphic = new Graphic(results[0].geometry, selectionSymbol, 50, 50); map.graphics.add(graphic); ...


0

You can access to the specific coordinates of the bounds this way: console.log(bounds[0][0]); console.log(bounds[0][1]); console.log(bounds[1][0]); console.log(bounds[1][1]); But take into account that in the bounds you'll have two coordinates that form the two corners of the bounding box, so perhaps you ...


0

oh, i'm stupid.. window.setVisibleWMS = function(visible, index){ window._blockEvents = true; map.getLayers().item(index).setVisible(visible); window._blockEvents = false; } This code working.. Thanks.


0

What you're looking for is the drawend event that is fired by the ol.interaction.Draw object you created. If you hook into it, you will get back the feature that has been drawn. See the fiddle below: https://jsfiddle.net/Lg8w71kv/1/


0

Outside of polling for size changes, there isn't a way to detect a resize of a <div>. I usually use absolute positioning on the map container and let Leaflet handle resize automatically. Like this: http://jsfiddle.net/asnyder14/0gsfdxeg/


1

When you have a layer that also listens for click then it will pick up the top most layer's event. Check out this fiddle. You can add the shape click handler and see that it picks that up instead of the map's.


0

I found this post after a search for a comparison of current web mapping toolkits. I think it is still mostly relevant. However, I wanted to share OSGeo's comprehensive list of toolkits as an additional resource.


3

I think you need to use IdentityManager from the API that allows you to sign in with your arcgis.com account and then receive access to the data. Whatever users from your organization that have accounts can sign in as well. https://developers.arcgis.com/javascript/jsapi/identitymanager-amd.html And here is a sample that shows what I think you are trying to ...


0

I'm pretty sure the CartoDB javascript API is the Leaflet API, so have a look at their doco: http://leafletjs.com/reference.html#latlng You can either just pull the values out of there, something like this: var coord = L.latLng(50.5, 30.5); var lng = coord.lng; var lat = coord.lat; Or you could store it as your own object, like this: var lnglat = ...


0

Actually I found out that when I load ArcGIS API to my HTML then I can use require like requireJS (but with '.js' at the end) <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <!--The viewport meta tag is used to improve the presentation and behavior of the ...


0

The main question is: does the WMS server support generating tiles in EPG:3857 projection? It seems, after querying for its capabilities, it supports Web Mercator for the layer nppodyji_wms. For the other ones, the only supported projection is EPSG:102067. As the requested layer is a composite made of several datasets, all the layers have to support the ...


2

you're in luck. the beta version of the 4.0 ArcGIS API for JavaScript includes 3D support and was released on July 16th. https://developers.arcgis.com/javascript/beta/


0

I primarily work with KML Layers to display any features/information on Google Maps (and Google Earth). I have had better success with the API recognizing them over its own markers. I use ArcGIS to create them, using the Layer to KML tool, and they will take on any symbology/pop up info that you have displayed with them upon conversion. So once they are how ...


0

Ok found the solution! Was using older version of cartodb. As per @cge comments in Dynamic rendering on a layer with a long SQL query


0

After looking around I found this page to help with the JavaScript side of this question. Link: https://developers.arcgis.com/javascript/jsapi/picturemarkersymbol-amd.html This link also looks like it covers a wide variety of modification types for .svg files. Link: https://css-tricks.com/using-svg/ I hope that these help! Cameron


0

Looks like the easy compact "built in" way is simply to add the "permalink" control with anchor:true like so: map.addControl(new OpenLayers.Control.Permalink({anchor: true})); That will make URLs with a particular parameter format appearing after the '#'. For example: #zoom=10&lat=51.48957&lon=-0.05879&layers=B There's a nice short example on ...


0

This was caused by a bug as @Javi Santana says in the comments, but it's been fixed already and your map seems to be behaving as expected :-)


1

I've been stuck on an issue quite similar to yours by having a custom control with a scrollable div inside. At least a partial solution can be achieved by using lines like this: var elem = L.DomUtil.get('yourelementid'); L.DomEvent.on(elem, 'mousewheel', L.DomEvent.stopPropagation); where elem is the element that's laid out over the map. This prevents ...


0

Check out this OpenLayers 2 Example. Google Layers should work fine without a key. The problem may be that your googleapi script <script src="https://maps.googleapis.com/maps/api/js?sensor=false" type="text/javascript" ></script> differs from that in the example shown below. <script ...


3

You could – along the lines of map.on('zoomend' … insert a conditional statement into layer.on('click' … querying map.getZoom(): layer.on('click', function() { if(map.getZoom() < 10) { map.fitBounds(layer.getBounds()) } });


0

You can iterate over the layers in a L.FeatureGroup with eachLayer: var match = featureGroup.eachLayer(function(layer) { if (layer.feature.properties.ID == uniqueID) { return layer } } L.FeatureGroup documentation


0

Use OpenLayers or leaflet. Both are JS libraries and will do all the basic GIS stuff. leaflet : Openlayers 3


1

There are no problems with the coordinates included in your code. The problem is with, how you included them. The coordinate transformation goes smoothly as far as I can see, but I changed your iteration technique to my own, because for me, the one included in your Fiddle was a bit strange (I hope that won't lead to a confusion). The first problem was with ...


1

I had the same problem and i tried to solve it with the answers above but it did not work for me. What actually worked is this var polygonLayer = new OpenLayers.Layer.Vector("Polygon"); var polygon = new OpenLayers.Control.DrawFeature(polygonLayer, OpenLayers.Handler.Polygon); map.addControl(polygon); polygon.handler.callbacks.point = function(point){ ...


0

You should check your transformation of the coordinates. That what i got from console.log(points[0]) [1072173.6812907949, -15779360.632217405] Is that correct (the minus)? Update: Since the handled coordinates are strings you nede to convert them: like Number(res[0][i]) Not sure what you want to do with [res[0][i += 1] but if you do so yo need to ...


0

Can you verify that the URL strings that the CesiumTerrainProvider is trying to access are accessible. This is probably a simple path problem.


1

@comments If you cant set a Parameter 'slider: false' for the Basic layer group (you are using map.getLayerGroup()) then you should just set the slider for all layers true resp. false/undefinded for the ones who shouldn't have a slider. After that switch the If-statment. var slider = layer.get('slider'); var name = layer.get('name') ? ...


0

I think you are looking for the UniqueValueRenderer, which will allow you to symbolize features by attributes. https://developers.arcgis.com/javascript/jsapi/uniquevaluerenderer-amd.html#uniquevaluerenderer


0

I never actually was able to use L.mapbox.featureLayer for this. I ended up having to use Leaflet's L.geoJson, adding featureLayer to map instead of the featureGroup, and adding the layer to the featureGroup at onEachFeature. Here's what my final code looked like: var featureGroup = L.featureGroup().addTo(map); if (oldData) { var featureLayer = ...


0

You could just pass the pointToLayer function as an option on layer instantiation. var layer = L.myLayer(geojson, { pointToLayer: function (ftr, latLng) { return L.marker([latlng.lat, latlng.lng]); } }); And then get markers off the layer instance. var markers = layer.getLayers();



Top 50 recent answers are included