I am trying to move a label to a different spot in a WFS layer, but it does not allow me to move it. Qgis asks me for a primary Key but after that nothing happens, and if i clikc the label again it asks me for a primary key again.
Is it not possible to manually move a label in a WFS layer?
Managed to figure it out. It is possible to move labels but ONLY if WFS has an x and y coordinates. You have to show the layer which attribute is x and y in data defined compartment in Placment window.
After this turn on editing on your wfs layer, and you can move the labels.
Related
I've created a base layer and 6 different overlay (Points of Interest) layers for a leaflet map.
The base layer of markers can appear on the map almost anywhere in the world, but I want the POI layers to appear only if they are in the same area (mapBounds) of the base layer. Probably the screen size.
All the data is pulled from a MySQL database and using Ajax I create the various sets of markers from two different tables, base and poi. This much is all done and working, you can see it at https://net-control.us/map2.php. The green and blue markers are from the base table, other markers are currently selected for view by clicking on the appropriate icon in the lower right. The only one active at the moment is 'Fire Station'. But if you zoom out far enough you will see additional fire stations in the Kansas City area, and in Florida. Those sets are not needed.
After the query runs I create a fitBounds variable of the base layer and another poiBounds for the poi layer. But I'm not sure I need the poiBounds. The number of base markers is generally less than 50 for the base query, but if all the poi markers are pulled world wide that number could be very large.
So I'm hoping someone can help me determine a best practice for this kind of scenario and maybe offer up an example of how it should be done. Should I...
1) Download all POIs and not worry about them appearing outside the base bounds layer? Should I inhibit them from showing in the javascript or in the SQL? How?
2) If I inhibit the unwanted points from SQL do I test one POI at a time to see if its included in the base bounds? How? Are there MySQL functions perhaps to work with this kind of data?
I'm fairly new at leaflet maps and would appreciate examples if appropriate.
2) If I inhibit the unwanted points from SQL do I test one POI at a time to see if its included in the base bounds? How? Are there MySQL functions perhaps to work with this kind of data?
You probably want a column of type POINT, a spatial index on such column (which internally is likely to be implemented as an R-Tree), and spatial relation functions on your SQL query to make use of that index.
Start by reading https://dev.mysql.com/doc/refman/8.0/en/spatial-types.html. Take your time, as spatial databases, spatial data types and spatial indices work a bit differently than their non-spatial equivalents.
So I'm new to unity and I was wondering how can I remove the layer mask on a game object? Every time I create a game object, it has 'Default' layer mask like this picture :
http://www.upsara.com/images/8ha1_untitled1.png
I imported an AI package and I noticed that all npc characters in this package don't have a layer mask like this picture :
http://www.upsara.com/images/uv73_untitled2.png
And I dont know how is that possible and I want add a few new characters but when I import this new characters and add them to scene thier layer is 'Default' and AI system wont intract whith them.
This is just a layer with no name and you can easily re-create that.
To understand what's happening, go to Add layers:
See the image below:
Notice how layer 3 doesn't have a name? That's what that asset is doing. It is setting is layer to a layer that not named. For example, layer 3, 6, 7 and 10 are not named in the image above.
You can do that from code. Let's set it to one of the empty layers (6):
this.gameObject.layer = 6;
This is what happens:
Now, you can use one of the AssetPostprocessor functions to detect when anything is imported then automatically change the layer to an empty layer.
I am new to Unreal Engine and was trying to customize my own blueprint according to some tutorial online. However, I did not know which function to call when trying to extend a node and a pin. What I am trying to achieve is as below:
There are 2 parts here that I could not figure it out.
How to extend the "Handle Location" variable, so that I could obtain the X:0, Y:0, Z:0 box as seen above?
How to create the pin extension box, where one node is able to connect to another 2 nodes?
Both of those boxes you highlight above are Vector Addition nodes. If you drag off a Vector pin, you should be able to search for "vector + vector" in the search box that appears!
It looks like this:
Generally, when you drag off a pin, the box that appears will contain all the usual things you can do with a pin of that type. The search box is also quite smart, if you type "vector add" instead of "vector + vector," you will still get the vector + vector result!
Good luck!
You cannot extend a node pin. Pin is either an output or input. What you probably wanted to say is "split struct pin". You can do that by right-clicking on that particular pin and choosing "split struct pin". To reverse this, you can do the same and choose "recombine struct pin". For vectors, you can drag out the pin and choose "break vector" node in the node search. Similarly for rotators, "break rotator".
In short, click on an empty space in the same blueprint and search for "Get Handle Location". This gives you the reference to the vector you want to access. Then, drag the yellow pin and search for "break vector". Now you can access each axis location separately.
Keep in mind that you cannot access any variable of any blueprint in the game just by searching for it. Here you can because it is in the same blueprint. Otherwise, you need to make blueprints communicate together.
Is there a Leaflet plugin or example for letting the user control the display order of overlay layers in a map?
Turning layers on and off is working fine, but I'd like the user to be able to drag layer names within the layer control to set the Z order.
For Path class (Polygons, Polylines, etc.) there are methods 'bringToFront()' and 'bringToBack()'. You can't exactly set precise position in draw order, but iterating over layer list and calling 'bringToFront()' could be less time consuming, then re-drawing every layer (especialy if they are bigger).
I have a lot of annotations to manage inside the mapkit view.
The rules are :
1 -only show annotations when the mapView.region.span.longitudeDelta is above 0.042
2 -only show annotations inside the visible area.
3- remove the annotations when they comes out the visible area...
How I can do that ... Share your experience...
Thanks
You need a few things. One is to search your database for the pins with latitudes and longitudes inside the map's view. This is called a bounding box. The next is to remove the annotations when they move outside the visible rect of the map. Each time the map is moved, you'll have to recalculate what pins are in the box and what pins are outside but still on the map.
One hint I can give you is to divide the visible rect of the map into squares (maybe 17 x 23 squares of 20 x 20) and figure out if a pin goes into that square. If it does, mark that square as filled, and if another pin wants to go into that square, don't let it. This will allow you to filter the pins so there aren't too many on screen at one time.
It's not an easy problem, but if you do some search around you'll find your way through it. This cluster marker code for Google Maps might help.