Coder Social home page Coder Social logo

gmap-jslicer's Introduction

GMap-JSlicer

Image to Google Maps powered by javascript

slicer = new JSlicer(document.getElementById('map'), 'myImage.png');
slicer.init();

Allows you to view an image as a Google Map without have to do any pre-tiling or server-side work. Its quick and simple to implement.

This is not production ready and really should be only used as a code sample. However is does work.

We take a IMG element of the image we want to mapify then use Canvas to generate the necessary tiles used by Google Maps when rendering. The entire process is done client side in Javascript.

Eventually when Web Workers get better support for Canvas, we will use them to improve performance.

Also on some mobile device won't load images over a certain size. The iPhone is limited to width * height ≤ 3 * 1024 * 1024

See it in the wild: http://gvgmaps.com/

gmap-jslicer's People

Contributors

murtnowski avatar

Stargazers

 avatar Enzo Robaina avatar Ryo Lambert avatar ابو الحسن الجاوي avatar Memorias de un informático (Lorenzo) avatar Filipe Tagliatti avatar Andrew Hart avatar syon avatar albert avatar Benjamin Dransfield avatar Kris Haamer avatar Matthew Trigg avatar Qin Shulei avatar  avatar Chris Heald avatar Shiyi Lan avatar Jingming Colin Chen avatar P.N. Maskov avatar Sébastien Estournes avatar Dom Padden avatar Chris Allison avatar Ryan avatar  avatar  avatar Miles Peyton avatar Alex Ruiz avatar Valerii Iatsko avatar LethaK Maas avatar Taylor Durham avatar Juan Jose Flores avatar Erland Ranvinge avatar Noboru Kobayashi avatar Steven Calderon avatar Sergei Novikov avatar Jon Carlson avatar Yuta Imazu avatar Hiro Inami avatar Joohun, Maeng avatar samuele coppede avatar Slawomir Rodak avatar James Hernandez avatar

Watchers

ReShun Davis avatar James Cloos avatar  avatar Jon Carlson avatar Matthew Trigg avatar  avatar  avatar

gmap-jslicer's Issues

Making the map smaller

Thanks for this awesome script.

Currently the image occupies the entire map, making Google Map think that it is an entire planet. Makers, when dropped on the map, repeat across the left and right. Drawing circles near the top and bottom of the image create massive distortions as Google thinks we are near the poles.

One solution that I thought of was to make the image tiles smaller, making the entire image smaller. This way, the coordinates on the map are more representative of a flat surface (instead of a sphere). However, I could not center the new, smaller, image map in the view port. Any suggestions?

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.