Tag Info

New answers tagged

1

In addition to an answer over in SO, the inverse geodetic solution is not easy with near-antipodal points, as your question has. The inverse geodetic problem is solved iteratively using Vincenty's 1975 algorithm, which fails to converge for near antipodal points. However, the problem is still solvable using a different approach. See page 40 of Rapp RH ...


2

For an answer on the geodesic, your example 2 is the closest, but when you ran it you should have seen a couple warnings, NOTICE: Coordinate values were coerced into range [-180 -90, 180 90] for GEOGRAPHY NOTICE: Coordinate values were coerced into range [-180 -90, 180 90] for GEOGRAPHY because your input coordinates are not in lon/lat, they are in web ...


0

On the surface of a sphere, all lines are "horizontal lines" by definition. But you mean something else! If you refer to lines parallel to the equator (parallels of latitude), then they are all oriented E-W, i.e., have 0 or 270 azimuths. Any line, including those parallels, whose azimuth is unchanged at all points along it, is called a loxodrome (or rhumb ...


2

First, be careful with phrasing. Your "the angle between two locations" is unclear. Keeping things to a simple sphere, the azimuth of any oblique great circle route depends entirely on where you measure it. It can range all the way from 0 to 360 and be correct. You probably seek the starting azimuth of a great circle route from a certain point to another ...


0

I'm pretty sure you just need to turn your Map Service layer into a Feature Layer: How do you create a feature layer? Feature layers can be created by referencing a layer from either a map service or a feature service or by specifying a feature collection object. Use a map service if you just want to retrieve geometries and attributes ...


2

Here are two rectangles drawn on top of the map of the States. This is WFS 1.0.0 filter with two Intersects combined with OR <ogc:Filter> <ogc:Or> <ogc:Intersects> <ogc:PropertyName>topp:the_geom</ogc:PropertyName> <gml:Polygon> <gml:outerBoundaryIs> <gml:LinearRing> <gml:coordinates decimal="." cs="," ...


1

Have you tried using Intersects or Overlaps? Here are examples: http://mapserver.org/ogc/filter_encoding.html#currently-supported-features https://wiki.state.ma.us/confluence/display/massgis/GeoServer+-+WFS+-+Filter+-+Overlaps


0

This link might help: http://stackoverflow.com/questions/11652182/pop-up-with-tab-container I would just use a dojo dialog window and format the data however you want inside of it.


5

It's simple: create L.Map with scrollWheelZoom: false option, then add a listener: map.once('focus', function() { map.scrollWheelZoom.enable(); });


1

It's also possible to define all the styles w/i your javascript file using the path.setStyle() method. Something like: SupIncend.setStyle({ grid.setStyle({ fillColor: '<color>', color: '<color', weight: <number> }); Note that the style options are [leaflet path ...


1

It depends on how many files you need to convert. If you have a lot, a simple solution is to install the free GeoServer and publish all the shapefiles as WMS or WFS (depending on use-case). Geoserver handles the delivery and you do not need to no any conversion. This will allow you to overlay them in most web map scenarios without overloading your client ...


1

Add the graphics to a graphicsLayer, and listen for this layer's mouse-over event to detect when the hover starts. Listen for the mouse-out event to detect when the user's mouse has left the graphic (in which case you may want to close the infoWindow). There's a sample here which demonstrates this, albeit in a slightly more complicated manner.


1

You can access the features of the service by adding one of the service's layers as a feature layer to the map. See: http://jsfiddle.net/a0heum8w/ From there, you should be able to use a renderer to control the symbols used to draw the polygons: https://developers.arcgis.com/javascript/jssamples/#search/renderer


1

Problem solved : 'url' is located in the 'options' field of vectorProtocol $radio.onclick = function() { vectorProtocol.options.url = "/getouterdata"; refreshLayer.refresh({force: true}); });


0

In theory you could use the supported Query interface on this Service Layer to download the geometries: http://watersgeo.epa.gov/arcgis/rest/services/NHDPlus_NP21/WBD_NP21_Simplified/MapServer/0/query But this seems like it might not be the best idea. Following the full metadata link (http://www.horizon-systems.com/nhdplus/NHDPlusV2_home.php) you can get ...


3

You are providing html in setContent() var popup = L.popup(); function onMapClick(e) { popup .setLatLng(e.latlng) .setContent(e.latlng.toString() + '<a href="http://www.google.com">Visit Google</a>"') .openOn(map); } map.on('click', onMapClick);


0

You can draw lines using decimal degrees as follow: svg.append("path") .datum({type: "LineString", coordinates: [[-5, 40], [-5, 50], [10, 50], [10, 40], [-5, 40]] // points in decimal degrees }) .attr("d", path) .style({'fill': '#B10000', 'fill-opacity': 0.3}) .style({'stroke-width': 1, 'stroke': '#B10000', 'stroke-linejoin': 'round'});


1

For the map div sive you can use the getSize() function that returns a openLayers.Size instance that have width and height properties see: http://dev.openlayers.org/releases/OpenLayers-2.7/doc/apidocs/files/OpenLayers/Map-js.html#OpenLayers.Map.getSize map = new.OpenLayers.Map('map'); size = map.getSize() width = size.w height = size.h


0

try adding each layer (or a list of layers, it's as you prefer) in the succes fonction of your $.getJSON and call crear() in your document ready. If not, map.addLayers([]) will be called before the response is completed... so it will try to add an empty list function crear( n ){ $.getJSON('json/capas.json', function(data) { ...


1

Working here on Ubuntu 14.04.1 and Firefox 31:


3

The map object will take on the projection of the first layer you add to it, in the case of your code, the streets basemap is 102100 (web mercator). You have two options to solve this: Use your own basemap service that is in your 102726 projection so that the points from the web service show up in the correct place. Stick with arcgis online basemaps, ...


5

Your units are in decimal degrees and they should be in a projected coordinate system. If you still have the gps unit, you can change it to something like an appropriate UTM projection then download the coordinates and use those in your calculation.


0

It is as simple as to add properties field to the Geojson with the simple style specifications "properties": {"fill": "#B10001","fill-opacity": 0.2,"stroke": "#B10001", "stroke-opacity": 1,"stroke-width": 2,"title": "Ãrea del Incendio"}


0

So this is the answer. I guess this can be cause by the introduction of multithreading in 2.4. def on_loadFinished(self): self.ui.webViewResult.page().mainFrame().addToJavaScriptWindowObject("QGISInterface", self.moTAZJsInterface) def init_Clicked(self,iface): self.ui.webViewResult.loadFinished.connect(self.on_loadFinished) ...


0

Add Glasgow to the search before entering G1. Search would be for example: "Glasgow G1"


1

Relative to another point, and assuming a north-oriented map: If the longitude is less, it is to the left, if more, to the right. If the latitude is greater, it's above it, if less, below it. Based on the North-clockwise bearings in the first link, 0 is up, between 0 and 90 (exclusive) up-right, 90 right, > 90 - < 180 down-right, 180 down, > 180 - ...


0

OK, I found the solution. I use deactivate and activate on my SelectFeature controls, when I need to set opacity.


0

You can refer to opensource javascript geometry library @ geoJs.


0

I've written this, still work in progress http://gee.chalo.org.uk/Gee/Eric.html?databaseName=gtfs I have lots of stop icons, which are the little blue squares. If you pan out (assuming you are getting something) you should see black lines, which is the composite route map which takes a while to fetch, with what are obviously stations as they are vertices, ...


1

I write this html script for you from this formule, x and y are taken from your example. Edit : This code was written for your previous question in which you are looking for a javascript code (This question has been deleted). I'm sorry if I'm off topic and I hope this code will help you anyway. <!DOCTYPE html> <html> <head> ...


4

The OpenLayers.Control documentation says: Controls by default are added to the map they are contained within however it is possible to add a control to an external div by passing the div in the options parameter. So you just need to pass the div to the control while initialising it, somewhat like this: var mp=new ...


2

I believe you need a minimum of 3 points to translate, scale, and rotate. The procedure and open source code for doing this is explained here: http://docs.opencv.org/doc/tutorials/imgproc/imgtrans/warp_affine/warp_affine.html I'm assuming your images are not georeferenced, so it should not matter what your map projection is since the user only has to ...



Top 50 recent answers are included