Giter VIP home page Giter VIP logo

Comments (28)

bradcornford avatar bradcornford commented on July 18, 2024

Hi there,

I will need to push a change to allow shapes to be visible externally. I am on with this change now, and will report back with usage.

from googlmapper.

bradcornford avatar bradcornford commented on July 18, 2024

Okay, i've pushed a change and versioned it as v2.12.0/v1.8.0, with the require changes.

You can achieve what you need with the following:

Mapper::map(53.3, -1.4, ['eventAfterLoad' => 'circleListener(maps[0].shapes[0].circle_0);']);
<script type='text/javascript'>

function circleListener(circle) {
    circle.addListener('radius_changed', function()
    {
        console.log(circle.getRadius());
        console.log(circle.getCenter().lat());
        console.log(circle.getCenter().lng());
    });

    circle.addListener('center_changed', function()
    {
        console.log(circle.getRadius());
        console.log(circle.getCenter().lat());
        console.log(circle.getCenter().lng());
    });
}

</script>

from googlmapper.

giresse21 avatar giresse21 commented on July 18, 2024

thank you very much
i am waiting for you

2016-07-27 8:43 GMT+01:00 Bradley Cornford [email protected]:

Hi there,

I will need to push a change to allow shapes to be visible externally. I
am on with this change now, and will report back with usage.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#60 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/APYmgvjNpzNY6EgD-LMtHkhzXOupd0Izks5qZww6gaJpZM4JVMmm
.

from googlmapper.

bradcornford avatar bradcornford commented on July 18, 2024

Does the above work for you?

from googlmapper.

giresse21 avatar giresse21 commented on July 18, 2024

I have not yet tested,
i will give you a feedback

2016-07-27 13:31 GMT+01:00 Bradley Cornford [email protected]:

Does the above work for you?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#60 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/APYmgqfnMBoHuxLwglSNh6iJZo2SZu4iks5qZ0-ggaJpZM4JVMmm
.

from googlmapper.

giresse21 avatar giresse21 commented on July 18, 2024

hi Bradley,
it did not work

2016-07-27 13:33 GMT+01:00 arouna perez [email protected]:

I have not yet tested,
i will give you a feedback

2016-07-27 13:31 GMT+01:00 Bradley Cornford [email protected]:

Does the above work for you?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#60 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/APYmgqfnMBoHuxLwglSNh6iJZo2SZu4iks5qZ0-ggaJpZM4JVMmm
.

from googlmapper.

giresse21 avatar giresse21 commented on July 18, 2024

are you missing something?

2016-07-27 15:04 GMT+01:00 arouna perez [email protected]:

hi Bradley,
it did not work

2016-07-27 13:33 GMT+01:00 arouna perez [email protected]:

I have not yet tested,
i will give you a feedback

2016-07-27 13:31 GMT+01:00 Bradley Cornford [email protected]:

Does the above work for you?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#60 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/APYmgqfnMBoHuxLwglSNh6iJZo2SZu4iks5qZ0-ggaJpZM4JVMmm
.

from googlmapper.

bradcornford avatar bradcornford commented on July 18, 2024

Have you run 'composer update cornford/googlmapper' ?

from googlmapper.

giresse21 avatar giresse21 commented on July 18, 2024

yes i update my composer

here is my code in controller
$map=Mapper::map($response->getLatitude(), $response->getLongitude(),
['zoom' => 16,'draggable' => true, 'marker' => false],['eventAfterLoad' =>
'circleListener(maps[0].shapes[0].circle_0);'])->circle([['latitude' =>
$response->getLatitude(), 'longitude' => $response->getLongitude()]],
['editable' => 'true','draggable' => true,'strokeColor' => '#000000',
'strokeOpacity' => 0.1, 'strokeWeight' => 3, 'fillColor' => '#FFFFFF',
'radius' => $radius]);

2016-07-27 15:06 GMT+01:00 Bradley Cornford [email protected]:

Have you run 'composer update cornford/googlmapper' ?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#60 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/APYmgkVxQavq3OplbLjYJwrBiLNIkv7cks5qZ2XVgaJpZM4JVMmm
.

from googlmapper.

bradcornford avatar bradcornford commented on July 18, 2024

Try this:

$map = Mapper::map(
    $response->getLatitude(),
    $response->getLongitude(),
    [
        'zoom' => 16,
        'draggable' => true,
        'marker' => false,
        'eventAfterLoad' => 'circleListener(maps[0].shapes[0].circle_0);'
    ]
)
->circle(
    [
        [
            'latitude' => $response->getLatitude(),
            'longitude' => $response->getLongitude()
        ]
    ],
    [
        'editable' => 'true',
        'draggable' => true,
        'strokeColor' => '#000000',
        'strokeOpacity' => 0.1,
        'strokeWeight' => 3,
        'fillColor' => '#FFFFFF',
        'radius' => $radius
    ]
);

from googlmapper.

giresse21 avatar giresse21 commented on July 18, 2024

i try it
but the javascript function does not react

2016-07-27 15:12 GMT+01:00 Bradley Cornford [email protected]:

Try this:

$map=Mapper::map( $response->getLatitude(), $response->getLongitude(), [ 'zoom' => 16, 'draggable' => true, 'marker' => false, 'eventAfterLoad' => 'circleListener(maps[0].shapes[0].circle_0);' ])->circle( [ [ 'latitude' => $response->getLatitude(), 'longitude' => $response->getLongitude() ] ], [ 'editable' => 'true', 'draggable' => true, 'strokeColor' => '#000000', 'strokeOpacity' => 0.1, 'strokeWeight' => 3, 'fillColor' => '#FFFFFF', 'radius' => $radius ]);


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#60 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/APYmgowNQjN3PPnCpZlT6ctxi6t4DWhmks5qZ2dqgaJpZM4JVMmm
.

from googlmapper.

giresse21 avatar giresse21 commented on July 18, 2024

​when I change the radius or center on map nothing happens in
javascript function

2016-07-27 15:27 GMT+01:00 arouna perez [email protected]:

i try it
but the javascript function does not react

2016-07-27 15:12 GMT+01:00 Bradley Cornford [email protected]:

Try this:

$map=Mapper::map( $response->getLatitude(), $response->getLongitude(), [ 'zoom' => 16, 'draggable' => true, 'marker' => false, 'eventAfterLoad' => 'circleListener(maps[0].shapes[0].circle_0);' ])->circle( [ [ 'latitude' => $response->getLatitude(), 'longitude' => $response->getLongitude() ] ], [ 'editable' => 'true', 'draggable' => true, 'strokeColor' => '#000000', 'strokeOpacity' => 0.1, 'strokeWeight' => 3, 'fillColor' => '#FFFFFF', 'radius' => $radius ]);


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#60 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/APYmgowNQjN3PPnCpZlT6ctxi6t4DWhmks5qZ2dqgaJpZM4JVMmm
.

from googlmapper.

bradcornford avatar bradcornford commented on July 18, 2024

I've just run the following, and it works as expected:

use Cornford\Googlmapper\Facades\MapperFacade as Mapper;

Route::get('/test', function () {

    Mapper::map(
        53.3,
        -1.4,
        [
            'zoom' => 16,
            'draggable' => true,
            'marker' => false,
            'eventAfterLoad' => 'circleListener(maps[0].shapes[0].circle_0);'
        ]
    )
        ->circle(
            [
                [
                    'latitude' => 53.3,
                    'longitude' => -1.4
                ]
            ],
            [
                'editable' => true,
                'draggable' => true,
                'strokeColor' => '#000000',
                'strokeOpacity' => 0.1,
                'strokeWeight' => 3,
                'fillColor' => '#FFFFFF',
                'radius' => 100
            ]
        );

    print Mapper::render();

    print "<script type='text/javascript'>

    function circleListener(circle) {
        circle.addListener('radius_changed', function()
        {
            console.log(circle.getRadius());
            console.log(circle.getCenter().lat());
            console.log(circle.getCenter().lng());
        });

        circle.addListener('center_changed', function()
        {
            console.log(circle.getRadius());
            console.log(circle.getCenter().lat());
            console.log(circle.getCenter().lng());
        });
    }

    </script>";

});

And received this in console:


331.2584943954244
53.3
-1.3999999999999773
502.5610827158245
53.3
-1.3999999999999773

from googlmapper.

giresse21 avatar giresse21 commented on July 18, 2024

dit

Excuse me for disturbing you , when I move the circle on map or
change the raduis , the console does not display anything. i run
composer update this time.

2016-07-27 15:43 GMT+01:00 Bradley Cornford [email protected]:

I've just run the following, and it working as expected:

use \Cornford\Googlmapper\Facades\MapperFacade as Mapper;Route::get('/test', function () { Mapper::map( 53.3, -1.4, [ 'zoom' => 16, 'draggable' => true, 'marker' => false, 'eventAfterLoad' => 'circleListener(maps[0].shapes[0].circle_0);' ] ) ->circle( [ [ 'latitude' => 53.3, 'longitude' => -1.4 ] ], [ 'editable' => true, 'draggable' => true, 'strokeColor' => '#000000', 'strokeOpacity' => 0.1, 'strokeWeight' => 3, 'fillColor' => '#FFFFFF', 'radius' => 100 ] ); print Mapper::render(); print "<script type='text/javascript'> function circleListener(circle) { circle.addListener('radius_changed', function() { console.log(circle.getRadius()); console.log(circle.getCenter().lat()); console.log(circle.getCenter().lng()); }); circle.addListener('center_changed', function() { console.log(circle.getRadius()); console.log(circle.getCenter().lat()); console.log(circle.getCenter().lng()); }); } </script>";});

And received this in console:

/test:94 331.2584943954244
/test:95 53.3
/test:96 -1.3999999999999773
/test:94 502.5610827158245
/test:95 53.3
/test:96 -1.3999999999999773


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#60 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/APYmgklF7lGLefnjbP6FG3Nj575AIdb0ks5qZ26ZgaJpZM4JVMmm
.

from googlmapper.

bradcornford avatar bradcornford commented on July 18, 2024

Can you provide your composer.json, your controller method, and view please.

Just to confirm, does the map load?

from googlmapper.

giresse21 avatar giresse21 commented on July 18, 2024

yes the map load very well with circle
the problem it was i drag circle change radius or center the javascript
function does not show the new raduis or center it look like the event
"eventAfterLoad" does not respond

2016-07-27 18:25 GMT+01:00 Bradley Cornford [email protected]:

Can you provide your composer.json, your controller method, and view
please.

Just to confirm, does the map load?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#60 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/APYmgjLMKXHrB87MqsYJ06cR0Bgj7NcAks5qZ5SIgaJpZM4JVMmm
.

from googlmapper.

giresse21 avatar giresse21 commented on July 18, 2024

Route::get('/testtest', function () {

Mapper::map(
    53.3,
    -1.4,
    [
        'zoom' => 16,
        'draggable' => true,
        'marker' => false,
        'eventAfterLoad' =>

'circleListener(maps[0].shapes[0].circle_0);'
]
)
->circle(
[
[
'latitude' => 53.3,
'longitude' => -1.4
]
],
[
'editable' => true,
'draggable' => true,
'strokeColor' => '#000000',
'strokeOpacity' => 0.1,
'strokeWeight' => 3,
'fillColor' => '#FFFFFF',
'radius' => 100
]
);

print Mapper::render();

print "<script type='text/javascript'>

function circleListener(circle) {
    circle.addListener('radius_changed', function()
    {
        console.log(circle.getRadius());
        console.log(circle.getCenter().lat());
        console.log(circle.getCenter().lng());
    });

    circle.addListener('center_changed', function()
    {
        console.log(circle.getRadius());
        console.log(circle.getCenter().lat());
        console.log(circle.getCenter().lng());
    });
}

</script>";

});

2016-07-27 18:51 GMT+01:00 arouna perez [email protected]:

yes the map load very well with circle
the problem it was i drag circle change radius or center the javascript
function does not show the new raduis or center it look like the event
"eventAfterLoad" does not respond

2016-07-27 18:25 GMT+01:00 Bradley Cornford [email protected]:

Can you provide your composer.json, your controller method, and view
please.

Just to confirm, does the map load?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#60 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/APYmgjLMKXHrB87MqsYJ06cR0Bgj7NcAks5qZ5SIgaJpZM4JVMmm
.

from googlmapper.

bradcornford avatar bradcornford commented on July 18, 2024

What about your composer.json.

from googlmapper.

giresse21 avatar giresse21 commented on July 18, 2024

2016-07-27 19:06 GMT+01:00 Bradley Cornford [email protected]:

What about your composer.json.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#60 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/APYmgsO9DFekz3tBIb5t_lkP5gwhC8jjks5qZ54SgaJpZM4JVMmm
.

from googlmapper.

bradcornford avatar bradcornford commented on July 18, 2024

Which version of Laravel are you using? If its 5.* can you also run:

php artisan vendor:publish --provider="Cornford\\Googlmapper\\MapperServiceProvider"

If its 4.* can you also run:

composer update cornford/googlmapper

from googlmapper.

giresse21 avatar giresse21 commented on July 18, 2024

i use version 5.1
i already remove cornford googlImapper and install again,
it still does'nt work

2016-07-28 9:29 GMT+01:00 Bradley Cornford [email protected]:

Which version of Laravel are you using? If its 5.* can you also run:

php artisan vendor:publish --provider="Cornford\Googlmapper\MapperServiceProvider"


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#60 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/APYmgpyWv5dLZHpp9R9DCfoUlEW2jzWOks5qaGhjgaJpZM4JVMmm
.

from googlmapper.

giresse21 avatar giresse21 commented on July 18, 2024

Hello,
I always unable to retrieve the new coordinates of the circle when I
edit the circle on the map.
don't you have another solution for me please . I don't understand why
it does not work.

2016-07-28 12:06 GMT+01:00 arouna perez [email protected]:

i use version 5.1
i already remove cornford googlImapper and install again,
it still does'nt work

2016-07-28 9:29 GMT+01:00 Bradley Cornford [email protected]:

Which version of Laravel are you using? If its 5.* can you also run:

php artisan vendor:publish --provider="Cornford\Googlmapper\MapperServiceProvider"


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#60 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/APYmgpyWv5dLZHpp9R9DCfoUlEW2jzWOks5qaGhjgaJpZM4JVMmm
.

from googlmapper.

bradcornford avatar bradcornford commented on July 18, 2024

Can you confirm you have run the following commands:

composer update cornford/googlmapper
php artisan vendor:publish --provider="Cornford\\Googlmapper\\MapperServiceProvider"

Also can you confirm the version of Googlmapper you are using.

from googlmapper.

giresse21 avatar giresse21 commented on July 18, 2024

thank you very much
the comand php artisan vendor:publish
--provider="Cornford\Googlmapper\MapperServiceProvider"
was'nt copy the views in the ressources folder. i have it manually do and
everything work now.
thank you again

2016-08-01 11:45 GMT+01:00 Bradley Cornford [email protected]:

Can you confirm you have run the following commands:

composer update cornford/googlemapper
php artisan vendor:publish --provider="Cornford\Googlmapper\MapperServiceProvider"


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#60 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/APYmgrfzaTBwE22DWFXg4kHVnhwavudkks5qbc5ggaJpZM4JVMmm
.

from googlmapper.

bradcornford avatar bradcornford commented on July 18, 2024

Did you receive an error when running the command?

from googlmapper.

giresse21 avatar giresse21 commented on July 18, 2024

yes the first time
the errors was in my config/compile.php

2016-08-01 12:42 GMT+01:00 Bradley Cornford [email protected]:

Did you receive an error when running the command?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#60 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/APYmggjcIfTYRFnN8YSeKqXMHQ65cStgks5qbduUgaJpZM4JVMmm
.

from googlmapper.

giresse21 avatar giresse21 commented on July 18, 2024

hi bradley, i am working in another project
when i do print Mapper::render(); in my controller the map appear
but when i do {!! Mapper::render() !!} in view nothing appear
how can i fix it

2016-08-02 14:21 GMT+01:00 Bradley Cornford [email protected]:

Closed #60 #60.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#60 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/APYmgpmmIWw6glOS83zc3KyobNmdItnXks5qb0Q9gaJpZM4JVMmm
.

from googlmapper.

giresse21 avatar giresse21 commented on July 18, 2024

sorry, it is work fine now

2016-08-03 14:44 GMT+01:00 arouna perez [email protected]:

hi bradley, i am working in another project
when i do print Mapper::render(); in my controller the map appear
but when i do {!! Mapper::render() !!} in view nothing appear
how can i fix it

2016-08-02 14:21 GMT+01:00 Bradley Cornford [email protected]:

Closed #60 #60.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#60 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/APYmgpmmIWw6glOS83zc3KyobNmdItnXks5qb0Q9gaJpZM4JVMmm
.

from googlmapper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.