-
Notifications
You must be signed in to change notification settings - Fork 23
feat(Map): integrate Schema.org microdata for Map components #1326
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(Map): integrate Schema.org microdata for Map components #1326
Conversation
…eMap and YandexMap components
|
Playwright Test Component is ready. |
|
Preview is ready. |
src/components/Map/GoogleMap.tsx
Outdated
| itemType={GeoCoordinatesMicrodataValues.PlaceType} | ||
| > | ||
| {address && ( | ||
| <meta |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we can write this data in JSON-LD format?
example https://github.com/gravity-ui/page-constructor/blob/main/src/components/Media/Media.tsx#L168
| key={marker.address ?? marker.coordinate.join(',') ?? index} | ||
| > | ||
| <meta | ||
| itemProp={GeoCoordinatesMicrodataValues.LongitudeProp} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we can write this data in JSON-LD format?
example https://github.com/gravity-ui/page-constructor/blob/main/src/components/Media/Media.tsx#L168
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did I understand correctly that you want to allow the user to specify additional data for microdata ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No.
I suggest writing a microdata in a different format so as not to clog up the code. JSON-LD looks more compact.
<script type="application/ld+json" dangerouslySetInnerHTML={{__html: {write microdata values there}}} />
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it. I agree. Push changes a little bit later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Test example for YMap


Test example for Google Map