I have a electron app that is used to do network graph analysis based on real world graphs such as electric networks. At the moment I'm trying to implement an option where I layer the graph over a map and one can see the exact position of the nodes on the map. It looks like this:
Adding the map is done by open layers. I also want to be able to pan and zoom in while the map is shown. For this the map and graph have to move together. This should be possible with keyboard commands of the arrow keys and + and - .
When I use the arrow keys to direct up ,down ,left ,right everything works apart from open layers loading the map slower than the graph moves sometimes. But when I zoom with the keyboard the map from open layers is not zooming at all. I also tried every key on the keyboard and apparently there is not a single key that zooms the map eventho I activated the keyboard in the options.
The + and - keys generally work in the electron app so this is not a problem. Furthermore, the graph also zooms. It's just the map that does not.
Is there a way to fix this? If not what would be the best option to find a different solution than using the keyboard buttons?
Related
I’m working on creating a marker based AR game using AFrame 1.2.0 and ar.js 3.3.3. The display shows 2D images of animals that the user has to “find”. The whole game functions well now, but I was running into an issue of photos appearing distorted or warped. I figured out that the issue is the marker’s plane is not being read correctly by mobile devices. The pictures below include a red cube to show the issue better. The top one is on a PC’s webcam and shows correctly the box is mounted to the marker. The bottom one shows the box is not mounted to the marker.
I figure that the issue is either mobile device’s gyroscope features or that the screen dimensions are affecting the aspect ratio of the screen.
I’ve tried a few properties on Aframe’s a-entity, such as look-controls=‘Enabled:false’ and look-controls=‘magicWindowTrackingEnabled: false’. Neither of those made a difference. I haven’t found properties within ar.js to use. Just wondering if anyone has come across this issue and found a fix.
images planing correctly with the marker
images not planing correctly
arjs comes in two different, mutually exclusive builds - Image + location based tracking, and marker tracking (link).
Importing the wrong one may/will cause incorrect behavior like the one you experience.
I studied the multimarker documentation of ARToolKit for iOS and i have some troubles in achieving some sort of QR-Code.
I want, for example:
A set of 6 markers positioned differently on a picture, and when and only when ALL of them are present, some sort of video is displayed in the origin of them( i want to use some sort of CORNER Markers like QR-Code system ).
How to do this ? From what i've seen, on multimarkers, if 1 is present out of 6 for example, the object is displayed.
From looking into the ARToolKit code you can see that a MultiMarker is internally handled as one single Marker consisting of several Pattern:
https://github.com/artoolkit/artoolkit5/blob/master/lib/SRC/ARWrapper/ARMarker.cpp#L344
https://github.com/artoolkit/artoolkit5/blob/master/lib/SRC/ARWrapper/ARMarkerMulti.cpp#L75
That is why ARToolKit will always return true whenever one of the markers configured in the multi-marker configuration is visible.
Taking that into account ‘Multi-Markers’ are not the way to go for the target you would like to reach.
What you can do, however, is to configure each marker separately and add them as ‘Single-Marker’. Then you can query if all of these ‘Single-Markers’ are visible.
If so you can calculate the origin of all these ‘Single-Markers’ and render your object there.
You can get an idea on how to configure several ‘Single-Markers’ if you take a look here:
http://augmentmy.world/moving-cars-augmented-reality
Also take that example here on how to set to markers into the same coordinate system (and calculate the distance between them) you can use that as a starting point for calculating the origin between several markers:
https://github.com/artoolkit/artoolkit5/tree/master/AndroidStudioProjects/ARMarkerDistanceProj
I know that these are not iOS examples but I have only done Android so far. Also, the ARWrapper interface should be the same on Android and iOS, meaning to say there should not be much difference between these two.
I hope that helps
I am building an iOS map with local search functionality similar to Yelp.
The user will see a local map generated from Google Maps SDK from iOS, and local points of interest returned by the search, will be displayed on the map as custom markers. Simultaneously, the user can also see these same local search results in a list form on another screen.
My issue is as follows: to optimize loading time, I would like the app to load only the search results within the area displayed by the map, given the coordinates of the center of the map, and the zoom level. This would be more efficient than loading, say, all search results within a 30 km radius, most of which may not be visible on the map. Is there a simple way to know exactly what are the coordinates of the area displayed by the map on the user's phone (bottom left corner, top right corner)?
I have seen other posts online, explaining how the coordinates of the area can be calculated using zoom level, latitude, and screen resolution. However I am wondering if there is a simpler way commonly used by other apps that display local points of interest.
Thank you!
I'm developing a BlackBerry 10 mobile application using the Momentics IDE (native SDK).
I want to display a map using the mapview qml element which seems that it belongs to the blackberry team (it's not a google map). [ Blackberry 10 mapview ]
All I want is to configure the zoom level like google do, but it looks like the blackberry map doesn't have any attribute which can guarantee that except the "altitude" element which can assign some sort of zoom .
Any one can help on this ?
The altitude property is indeed the one you use for zooming. The paradigm is "how much area is viewable from a given altitude?"
To zoom in and zoom out from the map uses the altitude property.
To create zoom in/out animation you can use a simple javascript function that manages the animation. (For example implementing Elastic or Circular animation. See the Blackberry Stock Curves documentation for more details).
Instead, if you want determinate the viewable area from a given altitude you should work with the map scale
http://www.geog.ucsb.edu/~jeff/115a/lectures/scale_and_area_measurement.html
regards
Anyone figured out yet any way to control the z-order for GMSMarker markers in the Google Maps for iOS SDK? My maps look great, but I have a bad feeling that this functionality isn't supported yet...
I dug through the header files a little, hoping for some undocumented goodies... and poked through the debugger a little. Nada.
Also: I'm using marker.groundAnchor (a CGPoint property of MKMarker) to handle the fact that my custom marker images have offset ground anchors. This works great, but with the side effect that their location appears to be offset! In other words: if you place an image with a non-centered ground anchor, and don't set groundAnchor, the marker will appear to move as the map is zoomed. This is expected. However, if you do set the groundAnchor property the image will appear properly locked in place on the ground... but is now offset substantially from where it is supposed to be! I think this is a bug.
The Z-index feature is part of the google maps sdk for ios Version 1.4.0 - July 2013
Features list mentions:
Added a zIndex property on all overlays. Z-Indexes are calculated in two groups: GMSMarkers and all other overlays.