How to access district by district name in antv using React js? - reactjs

I want to create a map for showing the number of products selling in a particular district of India. in the backend, I have data like "West Delhi" name of the district and total count.I want to display the data in ant vision L7 district map. But not able to understand How they are consuming the data.

Related

STRAPI REST API Endpoint to get items with certain values in two relations

I struggle to get strapi rest api to return a restaurant that has certain values in two realations. The documentation does not tell me the answer.
My structure:
Restaurants has two relations and some data fields:
Name (data)
Image (data)
City (relation)
Foodtype (relation)
City has mutliple values
Berlin (id:1)
London (id:2)
Foodtype has multiple values
French (id:1)
Chinese (id:2)
I would like to create an API call that populates me all All images of Restaurants in Berlin with French food
I managed to populate All images of Restaurants in Berlin (so London is filtered out) but I would also like to reduce it to the restaurants with French food I used this GET call so far http://localhost:1337/api/cities/1?populate=restaurants.image
cities/1 reduces it to the City relation by ID. Can anybody advise me how I extend the API call to reduce it further to the foodtype relation for ID 1?

Google Data Studio Geo map Invalid Field for Zoom Area

I'm using Google Data Studio to track sales. I'm trying to utilizes the Geo Map to show the locations of "active" clients ( I have established a filter for active clients already).
I'm using City as the Dimension and Total sales as the metric. However, my Zoom Area option just show "Invalid Field" and doesn't let me change to anything else.
I have a Country Code, Region Code, City, State fields for location. I don't have a Zip Code location.
How do I changed by Zoom Area to Zoom in on the Country of a particular Country Code?
You have to change the data type of your fields to Geo data types respectively (like if you have a text field Country representing Country then change this to Geo data type Country) on your source.
Go to "Resource > Manage added data sources > Edit" and change the data type of the field.

How can I get a weather data for a county?

There are APIs for accessing the current weather based on latitude and longitude, but I don't see any way to get the latitude and longitude of a county.
The Yahoo Weather API uses WOEIDs to select location, and WOEIDs exist for both cities and counties.

Filter database by type Inferred from Text

I am working on an app that includes reading barcodes of products in supermarket. The problem I am facing is filtering out a product by checking if he is food product or not (toilet paper for example is not food, but corn is food).
I thought about filtering it by company - I got all the Manufactures names and the next step is to check them manualy in google if the Manufacture is producing only foods or not [hopefully its one of those options].
But I have 2,500 different Manufactures...
This is an example of the information I have about each product in my DB:
<Item>
<PriceUpdateDate>2014-07-06 08:37</PriceUpdateDate>
<ItemCode>11210000094</ItemCode>
<ItemType>1</ItemType>
<ItemName>tabasco sauce 60 </ItemName>
<ManufacturerName>Nitzan</ManufacturerName>
<ManufactureCountry>US</ManufactureCountry>
<ManufacturerItemDescription>Tabasco sauce</ManufacturerItemDescription>
<UnitQty>milligram</UnitQty>
<Quantity>60.00</Quantity>
<bIsWeighted>0</bIsWeighted>
<UnitOfMeasure>100 milligram</UnitOfMeasure>
<QtyInPackage>0</QtyInPackage>
<ItemPrice>12.80</ItemPrice>
<UnitOfMeasurePrice>21.33</UnitOfMeasurePrice>
<AllowDiscount>1</AllowDiscount>
<ItemStatus>1</ItemStatus>
</Item>

Get Longitude and Latitude from Country Name

I have Gmaps embedded in my site which pulls out a list of dealers from my database around the world and plots their location with a marker based on the dealer postcode in Gmaps. This works great however I need to extend this functionality to support dealers who do not have a postcode but rather, they are assigned to Countries.
So for example, Test Dealer could be assigned to Germany and Belgium so I need to somehow get a generic longitude and latitude value for the country names "Germany" and "Belgium" and then show a marker for those long/lat values.
Is this possible?
If so, where do I start?!
Thanks for reading.
kris
Try using google's geocoder. Just provide a generic address, in your case a country and it will return the center point of that country together with the coordinates(latitude and longitude)
Here's a link. https://developers.google.com/maps/documentation/javascript/geocoding

Resources