Is there any way in forge, to drop pins and draw boundaries in the pdf - autodesk-forge

i need to drop pins to a 2d drawing in the forge viewer and also divide 2d drawing in different zones/area. is it possible to do that with forge viewer?

Adding to Petr's suggestion. Take a look at this blog post, on how to add markup (so you can drop a pin).
https://forge.autodesk.com/blog/viewing-large-ocrterrain-images-forge-viewer
To divide the 2d drawing into different zones, do you mean split screen ? A bit like this split screen ...
https://forge.autodesk.com/blog/compare-two-2d-documents-using-forge-viewer
If so, take a look at split viewer code here: https://github.com/wallabyway/2DCompare/blob/80564eea77dcc404a799d68a446cb918952ed8d4/docs/extensions/PixelCompare/PixelCompare.min.js#L235-L268

Related

Viewing Multiple .DWG files in viewer using Forge API

I need to see multiple .DWG in the Forge viewer in 3D format. There are some buttons on the viewer screen using which we can toggle between 2D and 3D views. On using those toggle buttons, currently we are able to see only one file at a time in the 3D view. Is there any option to view multiple files in 3D format?
You can use three ways to see multiple views of the same model.
Split the screen into multiple screens (SplitScreenExtension): https://forge.autodesk.com/en/docs/viewer/v7/reference/Extensions/SplitScreenExtension/
Place a view inside a div: https://github.com/Autodesk-Forge/viewer-navigation.sample/blob/master/www/scripts/model.js
Creating a div that renders a view within a DockingPanel.
I may have already answered this in your other Stackoverflow question, but, it is the same answer here. Try loading multiple models into a scene, using this blog post as your guide:
https://forge.autodesk.com/blog/loading-multiple-models-forge-viewer-v7
One neat trick with Forge Viewer, is the ability to load a 2D sheet inside the 3D world. The 2D sheet, if it comes from DWG, it will be vector lines, and if it's an old PDF, it will be image tiles.
Here's a video of combining 2D sheets into a 3D scene, into something more useful to your user...

Is there a way to match coordinates from 2D sheets to 3D view for an item?

I work on forge viewer to display Revit converted files. I try to put points into 2D sheets view that I would then display into 3D view. (e.g. in revit red house sample file, from sheet "A-102 plans" to 3D view {3D} ).
Currently, I see only something like:
From 2D view:
Extract coordinates of point from 2D view relatively to item 2d-bouding-box
Convert these relative coordinates into a x,y,z ratio to the size of the item (plus solve from x,y,z, what are the 2 axes we see in 2D)
Into 3D view:
Get 3D bounding box of the item
Compute point position from previous info
Since coordinates are different between the 2 views (which sounds expected), is there a more straightforward way to do this?
Thank you,

Best way to display 100k+ points on map

I have a dataset with several hundred thousand lat/long points. I would like to render these points on a map for info-graphic purposes (as small dots or something similar).
This is not something that necessarily has to be interactive, or rendered in a browser. It's okay if it's just an image.
I know that attempting this with markers and Google maps would be tough... any other tools out there that would generate this type of map? Preferably free/open source?
Or, do you have a method to make this work with something like Google maps? I don't want to use a marker clusterer... I need to be able to see all of the points.
In short :)
Download and fire-up Quantum GIS
Add some background map (e.g. OSM WMS layer from http://129.206.228.72/cached/osm)
Have your data in a CSV file, in WKT format, and load it on top (using add delimited text layer)
Save as image
You might want to peek what stackexchange.com has on GIS, too.

Create tiles given images and locations; convert markers to tiles

I've developed a HTML application that displays a map. This map has many fixed markers (they do not change in time).
Due to that:
I want to speed up the application
I want to hide the marker position from malicious users (so they can't use the information I've gathered for they're own porpose)
I want to convert the markers to a tile layer.
I've been googleing without success how to do this. Anyone has faced this problem and has a nice easy solution?
Thanks!
If the markers never change, there is a great solution:
Mapbox.
You can create your map with the markers, then the mapbox servors will send the tiles with the markers.
You can use a quadkey. It'similar to a quadtree. You can download my PHP class hilbert-curve # phpclasses.org. It also uses a quadkey.

Custom layer/overlay in google maps

Is it possible to create custom layers/overlays in google maps?
As an example, would it be possible to have one layer with polygons, another with circles, and a third with markers? and then hide/show these layers individually?
I tried looking at the documentation, but the layers seems to only be a fixed set of predefined layers. And overlays seems to only support image overlays.
Any help on this is appreciated.
I'm not sure if there exists a better way to do this, but I've found a workaround to a similar problem. My example utilizes markers and polylines, but it should be easy to extend the functionality to circles and polygons too.
Link to JSFiddle
Basically it works like this:
Initialize the map.
User selects an option what he would like to see on the map.
Click triggers a method (see HTML part of the fiddle) in the map object that first clears the map and then pushes new overlays on map.
The data that is currently shown on map is stored in arrays, and the map clearing method simply goes through these arrays and checks if there exists any content on map, and removes them if does.
Hope this helps. Cheers!