Permalink
Browse files

Customize extension

  • Loading branch information...
1 parent b7cc447 commit ea81380edb8de3cd8ebf5dfea5a0c3e16d95077d @mmarcon committed Nov 2, 2013
Showing with 36 additions and 7 deletions.
  1. +17 −1 EXTENSIONS.md
  2. +1 −0 dist/extensions/customize.min.js
  3. +1 −1 dist/extensions/route.min.js
  4. +1 −1 dist/jhere.min.js
  5. +12 −0 src/extensions/customize.js
  6. +4 −4 web/docs.html
View
@@ -154,4 +154,20 @@ Exposes markers clustering for better data visualuzation. When your maps get cro
To get rid of the clusters:
- $('#map').jHERE('nocluster', data);
+ $('#map').jHERE('nocluster', data);
+
+### customize extension
+
+Allows to customize particular aspects of the map.
+
+ $('.selector').jHERE('customize', options);
+
+Supported options are currently the following:
+
+ {
+ bubble: {
+ backgroundColor: '#ffffff',
+ color: '#111111',
+ autoClose: false /*Should bubbles be autoclosed when a new one is open?*/
+ }
+ }

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -23,6 +23,18 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
;(function($){
var _ns;
+ //### Customize particular aspects of the map
+ //`$('.selector').jHERE('customize', options)`
+ //
+ //Supported options are currently the following:
+ //
+ //<pre><code>{
+ // bubble: {
+ // backgroundColor: '#ffffff',
+ // color: '#111111',
+ // autoClose: false /*Should bubbles be autoclosed when a new one is open?*/
+ // }
+ //}</code></pre>
function customize(options){
_ns = _ns || nokia.maps;
var map = this.map;
View
@@ -290,7 +290,7 @@
<div id="section-14">
- <h3>Access the underlying JSLA framework</h3>
+ <h3>Access the underlying HERE JavaScript API framework</h3>
<p><code>$(&#39;.selector&#39;).jHERE(&#39;originalMap&#39;, closure);</code></p>
<p>This is useful when advanced operations
that are not exposed by this plugin need to be
@@ -299,8 +299,8 @@
<p><code>closure</code> should look like this:</p>
<pre><code>function(map, here){
//this is the DOM element
- //map is the JSLA map object
- //here is the whole JSLA API namespace
+ //map is the HERE JavaScript API map object
+ //here is the whole HERE JavaScript API namespace
}</code></pre>
</div>
@@ -343,7 +343,7 @@
<pre><code class="dark">$.jHERE.extend('myextension', function(param1, param2){
//this is the plugin object
//this.element is the DOM element
- //this.map is the JSLA map
+ //this.map is the HERE JavaScript API map
});</code></pre>
<p>A good example of extension is the <a href="https://github.com/mmarcon/jhere/blob/master/src/extensions/route.js">routing extension</a>.</p>

0 comments on commit ea81380

Please sign in to comment.