Whether it is fake reviews that mislead consumers and harm businesses, fake user activity that defrauds advertisers, or fake news that is used to manipulate elections and markets, fakery is pervasive…
Follow?
Here are the steps.
You can do this by making a couple of generic functions.
This first function performs a hiTest
on a given view and layer by converting the mapPoint
to a screenPoint
. Then it goes throught the steps of highlighting the feature on the map.
Now you need to add some click events to your views, so let me write a generic function for that.
This second method takes two sets of views and layers. It then calls event.stopPopagation()
to the popup doesn’t show up, and passes the mapPoint
, views, and layers to the hitView
method we just created.
Now we just needd to apply this method to our current views and layers.
This will now keep the hitTest
synced across two different map views.
You can see this sample in action here.
You can also watch a video where I cover this code sample step by step.
You’ll notice I’ve refactored the code in the sample above a bit from the video, but I like it much better now!
Go forth and geohack my friends!
Every field of human endeavour has had, at one time or another, its classic historian. To name but three, Warfare has had Thucydides; Empire, Edward Gibbon; Gulag, Alexander Solzhenitsyn. These were…
Learn how to manage your time and make the most of your time with these tips.
Marketing requires just as much thought as producing your art. If you market and want to sell your work, it should be seen by the right person. It may take more time than the production of your art…