Change icon of markercluster depending on marker type inside the cluster - google-maps-markers

I have a map with markers of at this time two different types: photos and blog posts. I would like to use a clustering system, preferably MarkerClusterer.
Is there a way to change the marker icon dynamically, or in other words, depending on what kinds of marker (photos or posts) are inside the cluster? For example, if the cluster only consists of photos, I would like to display some sort of camera icon, if there are only posts inside the cluster, I might want to display a letter. And if all types of markers are inside the cluster, I would like to use some sort of combined icon.
Can I somehow insert this check where I assign the URL of the icon in MarkerStyleOptions?
A bonus would be to also display the amount of markers of each type in the icon, i.e. two numbers.
Does anyone see a way to do this without having to change the source code?
I guess the simplest option is to keep each marker type in a seperate clusters ...

You must create a different array of marker for each group that you created. And try to create a MarkerCluster for each one.

Related

Is it possible to show map marker without input the Lat/Long with Leaflet

as the title stated, I'm trying to develop a GIS (geographic information system) webpage, whereby the user (admin) can input location and picture, and the marker will be shown/popup in the main page's map. I'm using Laravel framework and Leaflet for the map to implement the GIS. I manage to show the map without any marker yet. As the admin want to add the location to show the marker in the main page's map, normally what i've seen is that you need to include the Lat/Long for that specific location. It is true that including Lat/Long can make the marker more accurate to pin point the exact location, and I think it is necessary thing to include, as it is the main source of information to the system for pin point the location. But as a user, sometimes they not as diligent as we thought, the problem will occur if they left the lat/long to 0, because they are too lazy to search for the lat/long, thus making the initial goal which is to show marker in the main map fail.
Is there a way to make the Lat/Long automatically filled as the user type their location information? Or is there any other technologies for the GIS that I could implement/use?
Thank you.
If I'm not mistaken, then you are asking about this like
https://developers.google.com/maps/documentation/geocoding/overview

How to use one datablock in 2 canvases?

I have a form where are there one window, multiple datablocks and multiple canvases.
I need to use one datablock called USERS on two different canvases canvas1 and canvas2. But when I create the layout wizard the layout of the old canvas disappear and the form create the new one.
I want to use that datablock in canvas1 & canvas2.
The easiest way is to build 2 datablocks with different names and direct each datablock to its own canvas. Also, in this way, you can also redirect each datablock to a tab in the same canvas. I don't think there is a way to make one datablock appear on 2 canvases. I had the same problem before and I couldn't find a solution other than this.

How to add a tooltip that shows a bar chart onto a d3.js map

I have a map of the US with markers for stores in each state and currently when you hover over each marker, the name and address of that store shows up. I used a json file (us.json) to get the states coordinates and boundaries. The second json file (newstorelocations.json) contains information about each store and it's location which I used to display the markers. I used a tooltip for this.
What I currently have is at:
http://bl.ocks.org/binishbaig/3969ec74b485d1021034
gist:
https://gist.github.com/binishbaig/3969ec74b485d1021034
I have a third json file (newstorespend.json) that contains products and amount spent for each store. The variable StoreDescription exists in both the second and third json file. Any clue how can I make a simple vertical bar chart displaying amount and product for each store location when you hover over each marker? I am totally new to d3.js so I am guessing I would have to write a separate function creating the chart in a separate file, and then pass it into that variable d in the mouseover function but that's purely a guess. I did make a bar chart out of the data from the third file but how do I make individual bar charts for each store and show it when the mouse hovers over the corresponding store marker.
I would appreciate any help. Thanks in advance!
There's basically no difference between adding a chart to a tooltip vs doing it normally, you'll just need to grab the data and filter it so that it only applies to the data point that you're hovering over and then create/update the chart based on that data at the correct DOM element.
I've forked your gist and done just that. I just used the data that you had for Anchorage in your newstorespend.json file in your gist. Hover over the data point for the store in Anchorage to see what shows up.
You can take a look at http://bl.ocks.org/benlyall/37e757a1e6922dccb077
The onHover and offHover functions do all the work that you're probably interested in.
Note: this is only one way to do it, and possibly not even the best.

VTK display multiple images

Does someone knows how to display multiple images using ActiViz or VTK?
I have a RenderWindowControl, I would like to either display all the images like in a list in there or add multiple RenderWindowControls to display the multiple images..
Thanks!
You have some choices, for the task of visualize multiple images. I hope that at least one of them represents what you want to achieve:
1- Using multiple render windows. Basically, the example provided in the link creates an array of vtkRenderWindowInteractor objects, so that you can visualize multiple images.
2 - Using a single render window with viewports. The render window is splitted into viewports (renderer->SetViewport is the key, here), so that you can visualize n images at a time, where n is the number of viewports.
3 - Using the "slices" approach (the example works on DICOM files). This implements the "list" behaviour, as you said in your question. Basically, you visualize an image at a time, but you can navigate through them simply by pressing the arrow keys. The example derives the vtkInteractorStyleImage class to catch the events regarding key pressures.

Word VBA checkboxes with link to image that needs to be built up

I am having problems with a table containing checkboxes in Word.
I am working with a table containing 10 checkboxes. Next to this table, there is an image.
When the user checks one of the checkboxes, something has to be added to the image, i.e. the image is further completed.
However, the order of checking the checkboxes is not fixed or defined, so there are lots of different combinations.
Is there a way to add the additional parts to the original image, linked to the checkboxes? Or is this way too advanced for Word?
Word doesn't have this type of built-in functionality with images. There are too many state combinations for the checkboxes to make an image for each state in advance. One possibility could be to find a dll or ocx and draw the image programatically (advanced). Another would be to edit your image in photoshop and cut it up into 10 separate files using a transparent background. You could then add and remove layers to wherever you are displaying your image and control the z-ordering with vb.

Resources