Where is the sample code for this? - Example of Bus seat booking in React Maps Component

3 Replies

JM John McHale January 30, 2023 05:48 PM UTC

Ok, so I managed to find 'some' of the code:


(1) https://ej2.syncfusion.com/react/demos/#/bootstrap5/maps/seat-booking

(2) https://ej2.syncfusion.com/react/demos/maps/seat-booking/

(3) https://ej2.syncfusion.com/react/documentation/maps/getting-started/#installation-and-configuration


However, there are files missing.


Looking at the seat-booking.jsx file, you need to put the seat-selection.json file in the following directory:

'./src/maps/map-data/seat-selection.json'


However, there are other components that are missing and I don't know where they come from, namely:

import { updateSampleSection } from '../common/sample-base';

import { PropertyPane } from '../common/property-pane';


There is no common directory or associated components.

Also, the 'bus-icon' and 'wheel' icon are not in the following paths (which do NOT exist)

src="src/maps/images/bus-icon.png"

src="src/maps/images/wheel.png"


Surely someone from the Syncfusion team has the repo for this example? if so, where is it?

A swift reply would be nice!








JM John McHale January 30, 2023 05:58 PM UTC

This is the sample error output:


ERROR in ./src/seat-booking.jsx 10:0-60


Module not found: Error: You attempted to import ../common/sample-base which falls outside of the project src/ directory. Relative imports outside of src/ are not supported.

You can either move it inside src/, or add a symlink to it from project's node_modules/.



ERROR in ./src/seat-booking.jsx 11:0-55


Module not found: Error: You attempted to import ../common/property-pane which falls outside of the project src/ directory. Relative imports outside of src/ are not supported.

You can either move it inside src/, or add a symlink to it from project's node_modules/.








IR Indumathi Ravi Syncfusion Team January 31, 2023 10:33 AM UTC

Hi John,


The provided link does not contain sample code. But the below sample demo link will have a source tab which contains the sample code as well as the JSON data.

https://ej2.syncfusion.com/react/demos/#/bootstrap5/maps/seat-booking


The complete source code of the application is available in the below link.

https://github.com/syncfusion/ej2-react-samples


The icons and the JSON files of the Maps sample are available in the below location.

https://github.com/syncfusion/ej2-react-samples/tree/master/src/maps/images

https://github.com/syncfusion/ej2-react-samples/tree/master/src/maps/map-data


Please let us know if you need further assistance.


Loader.
Up arrow icon