PHP code example of davidpiesse / nova-map

1. Go to this page and download the library: Download davidpiesse/nova-map library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

davidpiesse / nova-map example snippets

 
    ->spatialType('Point')

Map::make('Some Point Field', 'point_field_name')
    ->spatialType('Point'),

Map::make('Some Polygon Field', 'polygon_field_name')
    ->spatialType('Polygon'),

Map::make('Some GeoJSON Field')
    ->spatialType('GeoJSON')
    ->geojson('geojson_field_name'),

Map::make('Some Point Location')
    ->spatialType('LatLon')
    ->latitude('latitude_field_name')
    ->longitude('longitude_field_name'),

Map::make('Some Point Location', 'coordinate_field_name')
    ->spatialType('LatLonField'),

Map::make('Some Point Field', 'point_field_name')
    ->spatialType('Point')
    ->height('300px'),

use SpatialTrait;

protected $spatialFields = [
    'geo_point',
    'geo_linestring',
    ...
];