Giter VIP home page Giter VIP logo

Comments (9)

messi89 avatar messi89 commented on August 17, 2024

problem solved

from googlmapper.

bradcornford avatar bradcornford commented on August 17, 2024

Excellent, what was your solution?

from googlmapper.

messi89 avatar messi89 commented on August 17, 2024

@bradcornford
by using a local markerclusterer.js on mapper.blade.php

<script type="text/javascript" src="/plugins/markerclusterer/markerclusterer.js"></script>

upload images folder and modified the MARKER_CLUSTER_IMAGE_PATH_ to '/plugins/markerclusterer/images/m';

from googlmapper.

bradcornford avatar bradcornford commented on August 17, 2024

@messi89 that seems a good solution. Are there not any config values that can be written? Rather than re-writing the source?

from googlmapper.

messi89 avatar messi89 commented on August 17, 2024

@bradcornford I take a quick look on the script, I think we can pass the path as option on the constructor

function MarkerClusterer(map, opt_markers, opt_options) {
.....
this.imagePath_ = options['imagePath'] || this.MARKER_CLUSTER_IMAGE_PATH_;

}

on mapper we have

public function map($latitude, $longitude, array $options = [])
{
}

what do you think ?

from googlmapper.

bradcornford avatar bradcornford commented on August 17, 2024

Yeah that could be a good way to do it, but may be better to do it in config as then it would be universal. I'm not sure how the plug in handles multiple constructor calls.

from googlmapper.

messi89 avatar messi89 commented on August 17, 2024

Yes it will be better !

from googlmapper.

bradcornford avatar bradcornford commented on August 17, 2024

Okay, so i've implemented the cluster marker settings in config, and for map instantiation. This can be found in the develop branch if you would like to take a look.

For usage when creating a map:

Mapper::map(53.3, -1.4, ['zoom' => 10, 'clusters' => ['icon' => '../images/m', 'size' => 4]]);

For usage in config:

'clusters' => array (
    'icon' => '//googlemaps.github.io/js-marker-clusterer/images/m',
    'grid' => 60,
    'zoom' => null,
    'center' => false,
    'size' => 2
)

from googlmapper.

bradcornford avatar bradcornford commented on August 17, 2024

This has now been merged to master, and versioned as current version 2.9.0.

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.