Hot answers tagged

11

If I interpret your issue correctly, you are looking for the move item content tool which is the rightmost tool button you can see in the toolbar @Joseph posted. Location of the move item content tool in QGIS 3:


9

The python addin button is actually simpler than I first thought. Just highlight a layer in the TOC and the button will pan to it. import arcpy, pythonaddins class ButtonClass1(object): """Implementation for pantolayer_addin.button (Button)""" def __init__(self): self.enabled = True self.checked = False def onClick(self): ...


9

map.flyTo() is available in Leaflet 1.0. However the parameters are different from those in the example. See http://leafletjs.com/reference-1.0.0.html#map-flyto flyTo(<LatLng> latlng, <Number> zoom?, <Zoom/pan options> options?) Example: flyTo([13.87992, 45.9791], 12)


8

You can pan the map by first selecting it. Then using the "Move item content" tool: While this tool is active as well you can also use the mouse wheel to zoom in and out on the map.


7

The problem is in your vector layer. You have to use updateWhileInteracting: var vector = new ol.layer.Vector({ updateWhileInteracting: true, ... }); As written in the API this might cause performance impact for large amounts of vector data.


5

To avoid the blank areas on tiles you can set these options on ol.Map constructor: var map = new ol.Map({ //.... loadTilesWhileAnimating: true, loadTilesWhileInteracting: true, //.... }); And another setting that helps is preload option on layer constructor: var hereLayer = new ol.layer.Tile({ preload: Infinity, source: new ol....


5

Another potential workaround (at least in 10.2) that doesn't make you mess with scale would be to right click the layer -> selection -> Select All, then right click the layer -> selection -> Pan to Selected Features, and then clear the selection.


5

You just have to use the "Move item content" tool


3

var map = new ol.Map({ interactions: ol.interaction.defaults({ doubleClickZoom: false, dragAndDrop: false, dragPan: false, keyboardPan: false, keyboardZoom: false, mouseWheelZoom: false, pointer: false, select: false }), controls: ol.control.defaults({ attribution: false, zoom: false, ...


3

This is perfect for an addin button. Assuming you want to pan to every single in your feature dataset, you can use the OID to do this. Something like this should give you a few ideas: mxd = arcpy.mapping.MapDocument("CURRENT") df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0] layer = "<name of the layer>" #Name of OID field idname = [str(x.name) ...


3

The fist problem is it's not an add-in. public class PanDown : ICommand should read public class PanDown : ESRI.ArcGIS.Desktop.AddIns.Tool or public class PanDown : ESRI.ArcGIS.Desktop.AddIns.Button Have a good read of this and start again from scratch, ensuring that you select an add-in type for your project when you start in Visual Studio. There are ...


2

If I understand you correctly, you are looking for the pan function:


1

Not sure if your using JQuery Autocomplete or the search plugin, so here are two examples. Here is an example using JQuery Autocomplete to search state polygons by name: http://www.gistechsolutions.com/leaflet/DEMO/Search/SearchState.html In the forEachFeature.... for your search layer, make the Leaflet layer ID the name to search on. // Tagging each ...


1

solved the problem by using cesium 1.34 And the following codes var target = new Cesium.Cartesian3.fromDegrees(103.85195, 1.290270, 35000000); viewer.camera.setView( { destination : target, orientation: { heading : Cesium.Math.toRadians(90.0), // east, default value is 0.0 (north) pitch : Cesium.Math.toRadians(-90), // default value (...


1

Is there a way to make the map draw before or during a pan movement? You're wrong in this assumption: Leaflet has no concept of "drawing the map". Rather, the artefact is due to the map's L.Renderers not being updated during a drag interaction. This is done for performance reasons: updating the vector data in a L.Renderer can be very intensive in certain ...


1

I tried a third mouse after trying the original on another computer. It was the mouse, and the second mouse I used to test it. The third mouse works fine. Good to know about the space bar trick though!


1

Try going to Settings>Options and then click the Map Tools tab/section. I believe that 2.18 had a control option (later removed in 3.0?) that allowed you to configure that. It would be in the Zooming or Panning and Zooming section and it was a dropdown menu called "Mouse wheel action."


1

In openlayers 5 using ES modules import Map from 'ol/Map'; import View from 'ol/View'; import TileLayer from 'ol/layer/Tile'; import XYZ from 'ol/source/XYZ';import {defaults as defaultInteractions} from 'ol/interaction.js'; new Map({ target:'map', layers: [ new TileLayer({ source: new XYZ({ ...


1

In QGIS you are able to do 3D maps (with QGIS2threejs plugin) and 2D animations (with TimeManager plugin) as described here: http://anitagraser.com/2011/11/20/nice-animations-with-time-managers-offset-feature/). But there is not a plugin for doing a 3D animation. However, there are some open source projects that would be interesting for that: Blender, a 3D ...


1

That note is over 7 years old so things have moved on a little since then :-) For current best practice you should look at the org.geotools.swing.tool package in the unsupported swing module. As far as I can see the idiom is to work directly on the MapPane passed in at construction.


1

i have found a solution in my application i have a raster, and i want to pan the raster here is the code i have void CMyQgsMapCanvas::mousePressEvent(QMouseEvent* pevent) { mMouseEvent = new QMouseEvent(pevent->type() , pevent->pos(), pevent->globalPos(), pevent->button(),pevent->buttons(), pevent->modifiers() ); mClickTimer....


1

You could add a custom control http://openlayers.org/en/v3.10.0/examples/custom-controls.html or even just some simple buttons to realize that. You can calculcate the bounds and the center and take these coordinates to pan the map to the left,right,top,bottom. Here is a jsfiddle: http://jsfiddle.net/expedio/hLzm22um/


1

I've made some tests and the behaviour is not exact the same, but it does the job. Here's a plunker. It is a clone of ol.interaction.DragPan.handleDragEvent_ It is done on pointermove event: map.on('pointermove', function(evt){ if(evt.dragging && evt.originalEvent.ctrlKey){ var centroid = [evt.originalEvent.clientX, evt.originalEvent....


1

For image layers, you can set a bigger buffer around the viewport. This is done on the source and works for ol.source.ImageWMS and ol.source.ImageMapGuide: new ol.source.ImageWMS({ // ... ratio: 2 }) The default is 1.5, and with a ratio setting of 2 you can pan the map from edge to edge without seeing the edge of the layer image.


1

From: http://trac.osgeo.org/openlayers/wiki/SelectFeatureControlMapDragIssues try setting stopDown = false on the SelectFeature. That is, selectFeatureControl.handlers.feature.stopDown = false; // for OL2.7 OR selectFeatureControl.handler.stopDown = false; // for OL < 2.7 selectFeatureControl.handler.stopUp = false;


1

After spending some time working though Beginning ArcGIS for Desktop Development using .NET, I came back and was reviewing what was going wrong for me. For whatever reason in the code block Michael gave me when I added in a geographic layer the pEnv.YMax and the pEnv.YMin were coming out as the same number, hence the ActiveView.Extent was staying the same ...


1

its not possible to get control over pan behavior in the JSAPI directly, but Ryan Mordoff wrote a really cool plugin and shared it on Github. i think most people are using it to increase the default multiplier, but you could also use it to achieve the inverse. see this thread for more info.


1

Make sure that your view center coordinates and zoom level are numbers. Currently they are strings (sometimes empty strings even), which leads to unexpected behavior. Something like var zoomy = parseFloat(getParameterByName('zoomy') || 0); var laty = parseFloat(getParameterByName('laty') || 0); var lony = parseFloat(getParameterByName('lony') || 0); Also ...


1

To zoom to a feature, you can open up the layer's attribute table and double click on the box at the start of its row: This unfortunately selects the feature, so it's not the most robust method. For more specialized methods you'll have to start making use of python and custom buttons. To mark areas you've visited, I'd suggest a 'visited' feature class. ...


1

You could try creating a Fishnet and then pan/zoom to each square/rectangle in the fishnet by right-clicking on its table and selecting 'zoom to' or 'pan to' http://resources.arcgis.com/en/help/main/10.2/index.html#//00170000002q000000 The Fishnet will help you keep track of which areas you've been to and which areas you still need to check. To use the ...


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