Can you set the initial pitch and zoom of react-native-maps - google-maps

I'd like to start the map in the extruded building view in react native - so that we can see the 3d building models. I think this would require me to set the pitch and zoom level.
I see the options for zoom level but I don't see any way to programmatically set the pitch. Is this possible? Is this possible cross-platform?

You can set the pitch / viewing angle with animateToViewingAngle(angle, duration) [Documentation]
Here you can find some GIFs to take a look at the effect: https://github.com/react-community/react-native-maps/pull/1544#issuecomment-325169134

Related

Does the size of anylogic elemnets can be changed while zoomIN++/ZoomOUT-- in GIS simulation as it does for the "GIS Regions"?

In Anylogic while running the GIS simulation model, the ZoomIn++/ZoomOut-- does not change size of Anylogic agents (for ex: car/train/bus) used into the model based on GIS map of Anylogic?
How it could be achieved? Does it offer any solution or property to anylogic elements for the relative size W.R.T. ZoomIn/ZoomOut property of GIS Model, as it follows for the "GIS Regions" (The size of GIs regions changes with GIS ZoomIn/ZoomOut)!!
Possible solutions, if exists!! /or Reasons/Restrictions behind?
ZoomIn Photo the size of elements is same
ZoomOut Photo the size of eements is same and full of mess not Easy to visualize
so first, please watch this video i made on how size works in an AnyLogic gis map:
https://www.youtube.com/watch?v=dAZo91lq44M
What I don't say on that video, is the answer to your question directly, which works only for 3D objects... What you need to do is to change the scale:
agent.Object3D.setScale(yourScale);
if you want to make them half the size, yourScale=0.5
for twice the size, yourScale=2
But AnyLogic is not able to identify when you zoom in/zoom out, so you have to do it manually, unless you use map.ZoomIn() method to do that.

Forge Edit2D customize toolset

I'm using the Edit2D extension to draw a Polyline over the 2D model then the path of the polyline is sent to the designautomation API to draw the same polyline in the revit file.
The problem I'm having is that the designautomation is drawing the polyline correctly but the scale is incorrect, it doesn't match with what i'm seeing in the browser. The shape is fine, but the scale is not.
I assume that I need to customize the toolset to set the unithandler to use feet instead of inches. The documentation says to register a custom toolset this way:
edit2d.registerTools(MyToolSetName);
But there is no documentation on how to create the MyToolSetName toolset (i saw it's a complex object doing reverse engineering)
Any clue how can I set the unithandler and register it with the registerTools function?
Or any clue on how to make my 2D view in forge match the same coordinates as revit?
Thanks
Update (October 24th)
I built a sample on that, based on sheetviews translated from Revit files.
Please, refer here for more details.
It takes advantage of this blog.
As of now, it only works for sheetviews with viewports containing views that were also translated (present in the bubble generated).
Since we're drawing in 2D view, we only get X and Y from Viewer. Z components of the curves are defined at workitem by the plane used for drawing.
There's also a video on the sample here
Please refer here for details about using Edit2D Toolset (specifically under 3.2 Units for Areas and Lengths) as it says:
Edit 2D uses the same units and length calibration as the MeasureExtension. You can use MeasureExtension’s calibration panel to specify units and calibration for your Edit2D shapes.
We also have a sample that does a similar flow (without Edit2D) here

Google Maps API V3 custom control sizes

Question -----
Is there a way to reference the size of default controls in the Google Maps API V3?
Background -----
I have a webapp that uses the Google Maps API (V3) for several mapping functions. The primary function is a location search with an advanced filter. I've added functions to handle two custom controls that I've positioned just below the +/- small zoom controls in the top-left side. The custom controls themselves work fine - one turns the user's current location on/off, and the other lets users draw a circle to define the search point and range/radius.
I'd like to make these custom controls look as consistent to the standard controls (namely the +/- small zoom controls) as I can. I think they look okay except for the size, which can vary wildly from the size of the standard controls. I've read that the API automatically sizes the standard controls used based on the type of device and screen size. While I appreciate that, I'd like to be able to make the size of my buttons the same as those.
I can provide screen clips if helpful (can't post yet until I build some rep points). Has anyone else dealt with this and figured out how to reference the standard controls in order to properly size custom controls?

How to reset camera altitude in Google earth

I want to reset the camera position to a much higher position or lesser zoom.
I am looking at the code here:
http://earth-api-samples.googlecode.com/svn/trunk/demos/drive-simulator/index.html
I think it should be done using DS_simulator object, but am not able to find out how.
Any help is appreciated.
You can use the Camera or LookAt to achieve this. Zooming in and out is controlled by the range attribute for a LookAt, and the altitude attribute for a Camera.
Here is a quick example of setting the range using a lookat.
// Get the current view.
var lookAt = ge.getView().copyAsLookAt(ge.ALTITUDE_RELATIVE_TO_GROUND);
// Zoom out to twice the current range.
lookAt.setRange(lookAt.getRange() * 2.0);
// Update the view in Google Earth.
ge.getView().setAbstractView(lookAt);
See this document for more information on controling the view using these two objects.
https://developers.google.com/earth/documentation/camera_control
Also, you can play with a working example here.
http://code.google.com/apis/ajax/playground/?exp=earth#move_camera

How to Find Spherical Mercator Points

I am using Open Street Maps to show a map in my HTML5 application.
It uses a URL like this for the map tiles,
http://b.tile.openstreetmap.org/{Z}/{X}/{Y}.png
If I chose an area, say Auckland, New Zealand, how could I work out all of the values of Z, X, Y that would cover Auckland? I would be looking to write a script to go and grab all those images and cache them in an HTML5 database.
First of all, take a look at the tile usage policy section about bulk download. Secondly, this sort of caching is easily done using TileStache: configure a cache to render or fetch tiles from a certain source, then run tilestache-seed.py, passing in the bounding box (in WGS84 coordinates) and desired zoom levels, and you should end up with all needed tiles.