Is it possible to add more than one IndoorManager tileset to an Azure Map? - azure-maps

I have a requirement to show more than one building indoor map on a single Azure Map. Does Azure Map's Indoor Module support adding more than one tileset to a map?
A single building's indoor map is created using the Azure Indoor Map Creator which results in a single tilesetId. This is added to an Azure Map using atlas.indoor.IndoorManager. I have two different tilesetIds that work when added to a map on their own, but I'm unable to have both visible and selectable individually.
This is the code I use but only the first tileset added is ever shown.
// building 1
const levelControl = new atlas.control.LevelControl({
position: "top-right",
});
const indoorManager = new atlas.indoor.IndoorManager(map, {
levelControl: levelControl,
tilesetId: tilesetId
});
// building 2
const levelControl2 = new atlas.control.LevelControl({
position: "top-right",
});
const indoorManager2 = new atlas.indoor.IndoorManager(map, {
levelControl: levelControl2,
tilesetId: tilesetId2,
});
The indoor manager class itself only appears to support a single tileset so my assumption is that I need a class per tileset, each with its own level control. However, this only ever renders the first indoor manager. I've swapped the tilesets around to confirm this.

The indoor manager currently does not support multiple tilesets. To get two buildings showing, you would need to append the conversionId of the second building to an existing dataset. You can then create a new tileset that contains both buildings.
Thanks,
Brendan

Related

ARKit RealityKit WorldMap Persistence

So I have a RealityKit app, in it I add variousEntities.
I looked for inspiration for persistence at Apple's SceneKit example with the code, which I implemented only to find out missing Entities upon WorldMap Load
I'm assuming you are able to save and load the worldMap from the ARView's session, but the problem is that this only persists the old styler ARAnchors, and not the cool new Entity objects from the new RealityKit features.
The work around that I did, was to initialize my AnchorEntities, using the constructor that takes an ARAnchor. So, from my hitTest, or RayCast, I take the world transform and save it as an ARAnchor, then use that to initialize an AnchorEntity. I gave this ARAnchor a unique name, to be used later to re-map to an entity upon loading a persisted world map, since this map still only has ARAnchors.
let arAnchor = ARAnchor(name: anchorId, transform: rayCast.worldTransform) // ARAnchor with unique name or ID
let anchorEntity = AnchorEntity(anchor: arAnchor)
That's what it looks like before adding the anchors to the scene for the first time. After you save your world map, close, and reload, I then loop over the loaded or persisted ARAnchors, and associate each anchor with their respective Entities, which maps to the name in the ARAnchor.
let anchorEntity = AnchorEntity(anchor: persistedArAnchor) // use the existing ARAnchor that persisted to construct an Entity
var someModelEntity: Entity = myEntityThatMatchesTheAnchorName // remake the entity that maps to the existing named ARAnchor
anchorEntity.addChild(someModelEntity)
arView.scene.addAnchor(anchorEntity)
It's indirect, but taking advantage of that association between AnchorEntity and ARAnchor was the first solution I could find, given the limitation of only knowing how to persists ARAnchors, and not Entities in the worldMap.

Embed leaflet data collection or geojson.io map to form

I'm trying to figure out the most lightweight way to collect data for individual mapped polygons from non-technical users. Here's the end vision: users fill out a web form, draw a shape, and then they can easily email their formatted data to me or my colleagues (I know-- the email idea is probably horrifying readers, but I'm working within a lot of restrictive parameters beyond my control. Email is a known quantity.).
Is there a way to strip down something like geojson.io or even just a leaflet map with leaflet.draw and then pass resulting coordinates into text that can be emailed?
Again, my needs are basic. One shape would be mapped at a time. The fewer visual options and controls the better. My audience is largely very non-technical.
It looks like this user was trying to ask the same question, but didn't get far.
Thanks!
A quick proof of concept, adapting code from Leaflet.draw example:
var drawControl = new L.Control.Draw({
edit: {
featureGroup: drawnItems
}
});
map.addControl(drawControl);
map.on('draw:created', function(e) {
var layer = e.layer,
popupContent = layer.toGeoJSON ?
JSON.stringify(layer.toGeoJSON()) : "(no data)";
drawnItems.addLayer(layer);
layer.bindPopup(popupContent).openPopup();
});
This converts the drawn item into GeoJSON string, and displays it in a popup bound to the item.
Demo: https://jsfiddle.net/3v7hd2vx/75/
As explained here, you cannot send your geojson data directly but you can let the browser open a mail client with preset data.
var text=JSON.stringify(drawnItems.toGeoJSON());
window.open('mailto:test#example.com?subject=subject&body=' + text);
Here is a full example

Common Exposed filter for each tab in drupal 7

I have different fields and showing in different blocks, and want to apply exposed filter to all but my problem is it shows different exposed filters for each different block. I want to make it common for each block.
Below are the steps,
I made 5 blocks to be displayed for each buttons.
Added exposed filter for languages for each block.
Now each block showing its different exposed filter.
But I want the exposed filter should be shown above the buttons and should work for each block display. Attached screenshot for the issue.
I installed Views Global Filter but is gives Session error.
I was just about to suggest the Views Global Filter.
Another way is to set a contextual filter on all your blocks that pulls from the url, so they each pull the same value.
This is an active issue in the views issue queue, with a few people who have made it work:
https://www.drupal.org/node/1587894
Comment #6 has some simple code, and that would be applied here
https://www.drupal.org/node/1871388
After 3 days, I haven't found the solution, even by programmatically.
Then what I had the last option(in my mind, huh) is,
I get all the fields in one block only, not creating the different blocks for different tab or buttons.
Used the description of Better Exposed Filters, in which I pasted my buttons/tab UI HTML as its.
Now on changing the language all the fields are fetched according to the selected language. But in this case my active tab/button get lost its activeness.
Now, I need to get the last active tab/buuton, so that I can click it again to get the active tab after filtering my languages.
Below is the piece of code which is need to my js file.
// Active target element to make the tab/button active after
// ajax responds in filter
var activeTargetElement;
Drupal.behaviors.events = {
attach: function (context, settings) {
$('#views-exposed-form-MY_VIEW_MACHINE_NAME-BLOCK_NAME', context).ajaxStart(function () {
// my tabs/button are active on the basis of data-target attribute,
// so need to memorise which tab/button is active before fitering any language
activeTargetElement = $('#MY_TABS li.active a').data('target');
}).ajaxSuccess(function () {
// if any target is memorised, then simply click it or trigger a click event for it
if($('[data-target="'+activeTargetElement+'"]').length){
$('[data-target="'+activeTargetElement+'"]').click();
}
});
}
};

SharePoint 2010: Custom Silverlight Web Part history field

I'm creating a custom application to view, create and manage a SharePoint 2010 list through a Silverlight 3 application. NOTE: It is a client side application
I've managed pretty much all the basic functions, loading the items of the list, creating new items, editing them etc... but I'm stuck with one specific function.
I have a text field ("multiple lines of text" in SharePoint) which has versioning activated, so as to keep a track of who, and when, each comment was made.
My problem is that I can't find a way to access the previous entries, using:
var comments = myListItem.FieldValues["Comments"];
commentsField.Text = comments.ToString();
returns a string of the most recent entry, but not of the previous entries.
I would like to be able to access all the comments made, together with who made them and when they were made.
Could you help me or point me to the right direction?
Thanks,
Kenny
Try this:
foreach (SPList list in yourList)
{
foreach (SPListItem item in list.Items)
{
foreach (SPListItemVersion version in item.Versions)
{
SPField temp = version.Fields["Comments"];
//use your temp
}
}
}

Loading dropdownlists

what is the best way to load dropdown lists from reference/lookup tables for a desktop application?
the application is layed out into 3 tiers. I've built up my entities.
the front end has a form with 6 tabs. and one big save (another discussion :)
Should I load them all when the form is initially loaded? Are there any caching mechanisms I could use?
it is vb.net app on a network drive that is accessed by several users.
it's also worth noting that some reference tables may be updated. Via another form.
thanks
T
Lots of factors. One you need to populate in constructor so the data is there to populate the visual elements. Beware that just because a tab is not visible does not mean it is not loaded when you app starts.
For a static list of strings
public class Library : INotifyPropertyChanged
{
private List<string> dropDown1;
public List<string> DropDown1 { get { return dropDown1; } }
public Library()
{
// use data reader to populate dropDown1
}
}
I know this will get comments that can use something lighter than a List but List has a lot of nice features, easy syntax, and easy to populate. As a next step you could structure as a client server and use some static so the list is populated once and then shared by all. If you have more properties then substitute string with a class. For a dynamic list then in the get you grab the current data from the table on demand. In your get you could hold on to the last list and if the next request is within X seconds then return stale data. It depends on if stale data is acceptable.
There are many other approaches and I do not pretend this is the best. Just putting out a relatively simple example to get you started.
When it gets to hierarchical then things get a little more complex. There you can use ADO.NET table to store the static dependent data and then apply a filter on a view.
If its a web page you don't have to load all tabs on page load.
Desktop i think it will be more easy and it should be like that.
Only when the user click on the tab show the page and hide all the pages
associated for other tabs.
i hope all tab pages values will be on session so that user can go and come back to any tab and your Big Save at last.
Something useful related to your question i found here
http://www.syncfusion.com/FAQ/windowsforms/faq_c93c.aspx
and one more

Resources