Tag Info

Hot answers tagged

5

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


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.


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


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);


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


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


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


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


1

Working here on Ubuntu 14.04.1 and Firefox 31:


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

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


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

This API link from EPA shows the Watersheds http://watersgeo.epa.gov/arcgis/rest/services/NHDPlus_NP21/WBD_NP21_Simplified/MapServer?f=jsapi - raw ...


1

It looks like you found the service to use ... http://watersgeo.epa.gov/arcgis/rest/services/NHDPlus_NP21/WBD_NP21_Simplified/MapServer/ Just plug that in to one of the many samples available and start from there. Go Here and click "Browse Samples" https://developers.arcgis.com/javascript/ Find one that does something similar to what you want to do (or ...


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

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


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



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